@doneisbetter/gds-core 2.6.3 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QEPN7PSA.mjs → chunk-6LOTZ3IZ.mjs} +1333 -561
- package/dist/chunk-BU3CRWRC.mjs +905 -0
- package/dist/client.d.mts +76 -10
- package/dist/client.d.ts +76 -10
- package/dist/client.js +1920 -621
- package/dist/client.mjs +44 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1920 -621
- package/dist/index.mjs +44 -2
- package/dist/server-CF4gCYQ-.d.mts +5572 -0
- package/dist/server-CF4gCYQ-.d.ts +5572 -0
- package/dist/server.d.mts +5 -6074
- package/dist/server.d.ts +5 -6074
- package/dist/server.js +1245 -456
- package/dist/server.mjs +29 -1
- package/package.json +2 -2
- package/dist/chunk-E3QXLNZO.mjs +0 -377
package/dist/client.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(client_exports, {
|
|
|
23
23
|
AccentPanel: () => AccentPanel,
|
|
24
24
|
AccessRecoveryPanel: () => AccessRecoveryPanel,
|
|
25
25
|
AccessSummary: () => AccessSummary,
|
|
26
|
+
ActionBar: () => ActionBar,
|
|
26
27
|
ArticleShell: () => ArticleShell,
|
|
27
28
|
AuthShell: () => AuthShell,
|
|
28
29
|
BrowseSurface: () => BrowseSurface,
|
|
@@ -32,6 +33,8 @@ __export(client_exports, {
|
|
|
32
33
|
ConsumerSection: () => ConsumerSection,
|
|
33
34
|
CtaButtonGroup: () => CtaButtonGroup,
|
|
34
35
|
DataToolbar: () => DataToolbar,
|
|
36
|
+
DetailProfileShell: () => DetailProfileShell,
|
|
37
|
+
DiscoveryShell: () => DiscoveryShell,
|
|
35
38
|
DocsCodeBlock: () => DocsCodeBlock,
|
|
36
39
|
DocsPageShell: () => DocsPageShell,
|
|
37
40
|
EditorialCard: () => EditorialCard,
|
|
@@ -39,31 +42,47 @@ __export(client_exports, {
|
|
|
39
42
|
EmptyState: () => EmptyState,
|
|
40
43
|
FeatureBand: () => FeatureBand,
|
|
41
44
|
FilterDrawer: () => FilterDrawer,
|
|
45
|
+
FoodMenuSection: () => FoodMenuSection,
|
|
42
46
|
FormField: () => FormField,
|
|
43
47
|
GameBoardTile: () => GameBoardTile,
|
|
44
48
|
GdsIcons: () => GdsIcons,
|
|
45
49
|
GdsVocabulary: () => GdsVocabulary,
|
|
50
|
+
ListingCard: () => ListingCard,
|
|
51
|
+
MapPanel: () => MapPanel,
|
|
46
52
|
MediaCard: () => MediaCard,
|
|
47
53
|
MediaField: () => MediaField,
|
|
48
54
|
MetricCard: () => MetricCard,
|
|
49
55
|
PageHeader: () => PageHeader,
|
|
50
56
|
PlaceholderPanel: () => PlaceholderPanel,
|
|
57
|
+
PlaybackSurface: () => PlaybackSurface,
|
|
51
58
|
ProductCard: () => ProductCard,
|
|
52
59
|
ProgressCard: () => ProgressCard,
|
|
53
60
|
PublicBrandFooter: () => PublicBrandFooter,
|
|
61
|
+
PublicFlowShell: () => PublicFlowShell,
|
|
62
|
+
PublicFoodCard: () => PublicFoodCard,
|
|
54
63
|
PublicNav: () => PublicNav,
|
|
55
64
|
PublicProductCard: () => PublicProductCard,
|
|
56
65
|
PublicShell: () => PublicShell,
|
|
57
66
|
PublicSiteFooter: () => PublicSiteFooter,
|
|
67
|
+
ReferenceLinkGrid: () => ReferenceLinkGrid,
|
|
68
|
+
ReferenceLocaleNotice: () => ReferenceLocaleNotice,
|
|
69
|
+
ReferenceSection: () => ReferenceSection,
|
|
70
|
+
ReferenceThemeExplorer: () => ReferenceThemeExplorer,
|
|
58
71
|
SectionPanel: () => SectionPanel,
|
|
59
72
|
SemanticButton: () => SemanticButton,
|
|
73
|
+
ShareButtonGroup: () => ShareButtonGroup,
|
|
74
|
+
SidebarNav: () => SidebarNav,
|
|
75
|
+
SidebarNavItem: () => SidebarNavItem,
|
|
76
|
+
SidebarNavSection: () => SidebarNavSection,
|
|
60
77
|
SimpleDataTable: () => SimpleDataTable,
|
|
78
|
+
SocialAuthButtons: () => SocialAuthButtons,
|
|
61
79
|
StateBlock: () => StateBlock,
|
|
62
80
|
StatsSection: () => StatsSection,
|
|
63
81
|
StatusBadge: () => StatusBadge,
|
|
64
82
|
ThemeToggle: () => ThemeToggle,
|
|
65
83
|
UploadDropzone: () => UploadDropzone,
|
|
66
84
|
ar: () => ar,
|
|
85
|
+
createGdsVocabularyPack: () => createGdsVocabularyPack,
|
|
67
86
|
de: () => de,
|
|
68
87
|
en: () => en,
|
|
69
88
|
es: () => es,
|
|
@@ -75,7 +94,9 @@ __export(client_exports, {
|
|
|
75
94
|
he: () => he,
|
|
76
95
|
hu: () => hu,
|
|
77
96
|
it: () => it,
|
|
97
|
+
mergeGdsVocabularyPacks: () => mergeGdsVocabularyPacks,
|
|
78
98
|
resolveAccentPanelStyles: () => resolveAccentPanelStyles,
|
|
99
|
+
resolveSemanticActionConfig: () => resolveSemanticActionConfig,
|
|
79
100
|
ru: () => ru
|
|
80
101
|
});
|
|
81
102
|
module.exports = __toCommonJS(client_exports);
|
|
@@ -225,7 +246,6 @@ var GdsIcons = {
|
|
|
225
246
|
|
|
226
247
|
// src/vocabulary.ts
|
|
227
248
|
var GdsVocabulary = {
|
|
228
|
-
// Base
|
|
229
249
|
settings: { id: "gds.action.settings", defaultMessage: "Settings", icon: GdsIcons.Settings, feedback: { icon: GdsIcons.Settings, color: "teal", messageId: "gds.feedback.saved" } },
|
|
230
250
|
analytics: { id: "gds.action.analytics", defaultMessage: "Analytics", icon: GdsIcons.Analytics, feedback: { icon: GdsIcons.Analytics, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
231
251
|
dashboard: { id: "gds.action.dashboard", defaultMessage: "Dashboard", icon: GdsIcons.Dashboard, feedback: { icon: GdsIcons.Dashboard, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
@@ -241,14 +261,12 @@ var GdsVocabulary = {
|
|
|
241
261
|
close: { id: "gds.action.close", defaultMessage: "Close", icon: GdsIcons.Close, feedback: { icon: GdsIcons.Close, color: "gray", messageId: "gds.feedback.closed" } },
|
|
242
262
|
language: { id: "gds.action.language", defaultMessage: "Language", icon: GdsIcons.Language, feedback: { icon: GdsIcons.Language, color: "teal", messageId: "gds.feedback.changed" } },
|
|
243
263
|
theme: { id: "gds.action.theme", defaultMessage: "Theme", icon: GdsIcons.Theme, feedback: { icon: GdsIcons.Theme, color: "teal", messageId: "gds.feedback.changed" } },
|
|
244
|
-
// Navigation
|
|
245
264
|
home: { id: "gds.action.home", defaultMessage: "Home", icon: GdsIcons.Home, feedback: { icon: GdsIcons.Home, color: "teal", messageId: "gds.feedback.opened" } },
|
|
246
265
|
inbox: { id: "gds.action.inbox", defaultMessage: "Inbox", icon: GdsIcons.Inbox, feedback: { icon: GdsIcons.Inbox, color: "teal", messageId: "gds.feedback.opened" } },
|
|
247
266
|
calendar: { id: "gds.action.calendar", defaultMessage: "Calendar", icon: GdsIcons.Calendar, feedback: { icon: GdsIcons.Calendar, color: "teal", messageId: "gds.feedback.opened" } },
|
|
248
267
|
gallery: { id: "gds.action.gallery", defaultMessage: "Gallery", icon: GdsIcons.Gallery, feedback: { icon: GdsIcons.Gallery, color: "teal", messageId: "gds.feedback.opened" } },
|
|
249
268
|
history: { id: "gds.action.history", defaultMessage: "History", icon: GdsIcons.History, feedback: { icon: GdsIcons.History, color: "teal", messageId: "gds.feedback.opened" } },
|
|
250
269
|
profile: { id: "gds.action.profile", defaultMessage: "Profile", icon: GdsIcons.Profile, feedback: { icon: GdsIcons.Profile, color: "teal", messageId: "gds.feedback.opened" } },
|
|
251
|
-
// Actions
|
|
252
270
|
send: { id: "gds.action.send", defaultMessage: "Send", icon: GdsIcons.Send, feedback: { icon: GdsIcons.Send, color: "blue", messageId: "gds.feedback.sent" } },
|
|
253
271
|
reply: { id: "gds.action.reply", defaultMessage: "Reply", icon: GdsIcons.Reply, feedback: { icon: GdsIcons.Reply, color: "blue", messageId: "gds.feedback.replied" } },
|
|
254
272
|
forward: { id: "gds.action.forward", defaultMessage: "Forward", icon: GdsIcons.Forward, feedback: { icon: GdsIcons.Forward, color: "blue", messageId: "gds.feedback.forwarded" } },
|
|
@@ -262,12 +280,10 @@ var GdsVocabulary = {
|
|
|
262
280
|
uncheck: { id: "gds.action.uncheck", defaultMessage: "Uncheck", icon: GdsIcons.Uncheck, feedback: { icon: GdsIcons.Uncheck, color: "red", messageId: "gds.feedback.unchecked" } },
|
|
263
281
|
complete: { id: "gds.action.complete", defaultMessage: "Complete", icon: GdsIcons.Complete, feedback: { icon: GdsIcons.Complete, color: "teal", messageId: "gds.feedback.completed" } },
|
|
264
282
|
clear: { id: "gds.action.clear", defaultMessage: "Clear", icon: GdsIcons.Clear, feedback: { icon: GdsIcons.Clear, color: "red", messageId: "gds.feedback.cleared" } },
|
|
265
|
-
// Media (camera project)
|
|
266
283
|
capture: { id: "gds.action.capture", defaultMessage: "Capture", icon: GdsIcons.Capture, feedback: { icon: GdsIcons.Capture, color: "teal", messageId: "gds.feedback.captured" } },
|
|
267
284
|
record: { id: "gds.action.record", defaultMessage: "Record", icon: GdsIcons.Record, feedback: { icon: GdsIcons.Record, color: "teal", messageId: "gds.feedback.recorded" } },
|
|
268
285
|
flip: { id: "gds.action.flip", defaultMessage: "Flip", icon: GdsIcons.Flip, feedback: { icon: GdsIcons.Flip, color: "teal", messageId: "gds.feedback.flipped" } },
|
|
269
286
|
flash: { id: "gds.action.flash", defaultMessage: "Flash", icon: GdsIcons.Flash, feedback: { icon: GdsIcons.Flash, color: "teal", messageId: "gds.feedback.flashed" } },
|
|
270
|
-
// Domain specific (amanoba, classscout, kidex, habigoal)
|
|
271
287
|
course: { id: "gds.action.course", defaultMessage: "Course", icon: GdsIcons.Course, feedback: { icon: GdsIcons.Course, color: "teal", messageId: "gds.feedback.done" } },
|
|
272
288
|
lesson: { id: "gds.action.lesson", defaultMessage: "Lesson", icon: GdsIcons.Lesson, feedback: { icon: GdsIcons.Lesson, color: "teal", messageId: "gds.feedback.done" } },
|
|
273
289
|
certificate: { id: "gds.action.certificate", defaultMessage: "Certificate", icon: GdsIcons.Certificate, feedback: { icon: GdsIcons.Certificate, color: "teal", messageId: "gds.feedback.done" } },
|
|
@@ -280,7 +296,6 @@ var GdsVocabulary = {
|
|
|
280
296
|
goal: { id: "gds.action.goal", defaultMessage: "Goal", icon: GdsIcons.Goal, feedback: { icon: GdsIcons.Goal, color: "teal", messageId: "gds.feedback.done" } },
|
|
281
297
|
streak: { id: "gds.action.streak", defaultMessage: "Streak", icon: GdsIcons.Streak, feedback: { icon: GdsIcons.Streak, color: "teal", messageId: "gds.feedback.done" } },
|
|
282
298
|
reward: { id: "gds.action.reward", defaultMessage: "Reward", icon: GdsIcons.Reward, feedback: { icon: GdsIcons.Reward, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
283
|
-
// Codebase analysis additions
|
|
284
299
|
trophy: { id: "gds.action.trophy", defaultMessage: "Trophy", icon: GdsIcons.Trophy, feedback: { icon: GdsIcons.Trophy, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
285
300
|
crown: { id: "gds.action.crown", defaultMessage: "Crown", icon: GdsIcons.Crown, feedback: { icon: GdsIcons.Crown, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
286
301
|
pause: { id: "gds.action.pause", defaultMessage: "Pause", icon: GdsIcons.Pause, feedback: { icon: GdsIcons.Pause, color: "teal", messageId: "gds.feedback.paused" } },
|
|
@@ -300,7 +315,6 @@ var GdsVocabulary = {
|
|
|
300
315
|
help: { id: "gds.action.help", defaultMessage: "Help", icon: GdsIcons.Help, feedback: { icon: GdsIcons.Help, color: "teal", messageId: "gds.feedback.done" } },
|
|
301
316
|
filter: { id: "gds.action.filter", defaultMessage: "Filter", icon: GdsIcons.Filter, feedback: { icon: GdsIcons.Filter, color: "teal", messageId: "gds.feedback.filtered" } },
|
|
302
317
|
sort: { id: "gds.action.sort", defaultMessage: "Sort", icon: GdsIcons.Sort, feedback: { icon: GdsIcons.Sort, color: "teal", messageId: "gds.feedback.sorted" } },
|
|
303
|
-
// Audit-driven additions
|
|
304
318
|
export: { id: "gds.action.export", defaultMessage: "Export", icon: GdsIcons.Export, feedback: { icon: GdsIcons.Export, color: "teal", messageId: "gds.feedback.exported" } },
|
|
305
319
|
import: { id: "gds.action.import", defaultMessage: "Import", icon: GdsIcons.Import, feedback: { icon: GdsIcons.Import, color: "teal", messageId: "gds.feedback.imported" } },
|
|
306
320
|
preview: { id: "gds.action.preview", defaultMessage: "Preview", icon: GdsIcons.Preview, feedback: { icon: GdsIcons.Preview, color: "teal", messageId: "gds.feedback.previewed" } },
|
|
@@ -318,19 +332,61 @@ var GdsVocabulary = {
|
|
|
318
332
|
refer: { id: "gds.action.refer", defaultMessage: "Refer", icon: GdsIcons.Refer, feedback: { icon: GdsIcons.Refer, color: "teal", messageId: "gds.feedback.referred" } },
|
|
319
333
|
evidence: { id: "gds.action.evidence", defaultMessage: "Evidence", icon: GdsIcons.Evidence, feedback: { icon: GdsIcons.Evidence, color: "teal", messageId: "gds.feedback.added" } }
|
|
320
334
|
};
|
|
321
|
-
function
|
|
322
|
-
return
|
|
335
|
+
function createGdsVocabularyPack(namespace, actions) {
|
|
336
|
+
return {
|
|
337
|
+
namespace,
|
|
338
|
+
actions: Object.fromEntries(
|
|
339
|
+
Object.entries(actions).map(([key, definition]) => [
|
|
340
|
+
`${namespace}:${key}`,
|
|
341
|
+
{
|
|
342
|
+
...definition,
|
|
343
|
+
id: `gds.action.${namespace}.${key}`
|
|
344
|
+
}
|
|
345
|
+
])
|
|
346
|
+
)
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
function mergeGdsVocabularyPacks(packs = []) {
|
|
350
|
+
return packs.reduce((acc, pack) => {
|
|
351
|
+
for (const [key, definition] of Object.entries(pack.actions)) {
|
|
352
|
+
acc[key] = definition;
|
|
353
|
+
}
|
|
354
|
+
return acc;
|
|
355
|
+
}, {});
|
|
356
|
+
}
|
|
357
|
+
function resolveSemanticActionConfig(action, packs = []) {
|
|
358
|
+
const baseConfig = GdsVocabulary[action];
|
|
359
|
+
if (baseConfig) {
|
|
360
|
+
return baseConfig;
|
|
361
|
+
}
|
|
362
|
+
const merged = mergeGdsVocabularyPacks(packs);
|
|
363
|
+
const packConfig = merged[action];
|
|
364
|
+
if (packConfig) {
|
|
365
|
+
return packConfig;
|
|
366
|
+
}
|
|
367
|
+
throw new Error(`Unknown semantic action: ${action}`);
|
|
368
|
+
}
|
|
369
|
+
function getSemanticActionConfig(action, packs = []) {
|
|
370
|
+
return resolveSemanticActionConfig(action, packs);
|
|
323
371
|
}
|
|
324
|
-
function getSemanticActionLabel(action, translate) {
|
|
325
|
-
const config =
|
|
372
|
+
function getSemanticActionLabel(action, translate, packs = []) {
|
|
373
|
+
const config = resolveSemanticActionConfig(action, packs);
|
|
326
374
|
return translate ? translate(config.id, config.defaultMessage) : config.defaultMessage;
|
|
327
375
|
}
|
|
328
376
|
|
|
329
377
|
// src/SemanticButton.tsx
|
|
330
378
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
331
|
-
function SemanticButton({
|
|
379
|
+
function SemanticButton({
|
|
380
|
+
action,
|
|
381
|
+
loading,
|
|
382
|
+
feedbackState,
|
|
383
|
+
feedbackText,
|
|
384
|
+
prerenderLabelOnly = true,
|
|
385
|
+
vocabularyPacks = [],
|
|
386
|
+
...props
|
|
387
|
+
}) {
|
|
332
388
|
const { t } = (0, import_gds_theme.useGdsTranslation)();
|
|
333
|
-
const config =
|
|
389
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
334
390
|
const [mounted, setMounted] = (0, import_react.useState)(!prerenderLabelOnly);
|
|
335
391
|
const [internalFeedback, setInternalFeedback] = (0, import_react.useState)(null);
|
|
336
392
|
(0, import_react.useEffect)(() => {
|
|
@@ -346,14 +402,14 @@ function SemanticButton({ action, loading, feedbackState, feedbackText, prerende
|
|
|
346
402
|
}
|
|
347
403
|
}, [feedbackState]);
|
|
348
404
|
let Icon = config.icon;
|
|
349
|
-
let label = getSemanticActionLabel(action, t);
|
|
405
|
+
let label = getSemanticActionLabel(action, t, vocabularyPacks);
|
|
350
406
|
let color = props.color;
|
|
351
407
|
if (!mounted) {
|
|
352
408
|
const { leftSection, ...buttonProps } = props;
|
|
353
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Button, { loading, color, ...buttonProps, children: getSemanticActionLabel(action) });
|
|
409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Button, { loading, color, ...buttonProps, children: getSemanticActionLabel(action, void 0, vocabularyPacks) });
|
|
354
410
|
}
|
|
355
411
|
if (internalFeedback === "success") {
|
|
356
|
-
const defaultFeedback =
|
|
412
|
+
const defaultFeedback = config.feedback ?? { icon: import_icons_react2.IconCheck, color: "teal", messageId: "gds.feedback.saved" };
|
|
357
413
|
Icon = defaultFeedback.icon;
|
|
358
414
|
label = feedbackText || t(defaultFeedback.messageId, "Success");
|
|
359
415
|
color = defaultFeedback.color;
|
|
@@ -396,33 +452,702 @@ function ConfirmDialog({
|
|
|
396
452
|
] });
|
|
397
453
|
}
|
|
398
454
|
|
|
399
|
-
// src/ThemeToggle.tsx
|
|
400
|
-
var import_core5 = require("@mantine/core");
|
|
401
|
-
var import_gds_theme2 = require("@doneisbetter/gds-theme");
|
|
402
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
403
|
-
function ThemeToggle({ size = "md" }) {
|
|
404
|
-
const { setColorScheme } = (0, import_core5.useMantineColorScheme)();
|
|
405
|
-
const computedColorScheme = (0, import_core5.useComputedColorScheme)("light", { getInitialValueInEffect: true });
|
|
406
|
-
const { t } = (0, import_gds_theme2.useGdsTranslation)();
|
|
407
|
-
const toggleColorScheme = () => {
|
|
408
|
-
setColorScheme(computedColorScheme === "dark" ? "light" : "dark");
|
|
409
|
-
};
|
|
410
|
-
const isDark = computedColorScheme === "dark";
|
|
411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
412
|
-
import_core5.ActionIcon,
|
|
413
|
-
{
|
|
414
|
-
onClick: toggleColorScheme,
|
|
415
|
-
variant: "default",
|
|
416
|
-
size,
|
|
417
|
-
"aria-label": t("gds.aria.themeToggle", "Toggle color scheme"),
|
|
418
|
-
children: isDark ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GdsIcons.Sun, { size: "1.2rem" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GdsIcons.Moon, { size: "1.2rem" })
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
|
|
455
|
+
// src/ThemeToggle.tsx
|
|
456
|
+
var import_core5 = require("@mantine/core");
|
|
457
|
+
var import_gds_theme2 = require("@doneisbetter/gds-theme");
|
|
458
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
459
|
+
function ThemeToggle({ size = "md" }) {
|
|
460
|
+
const { setColorScheme } = (0, import_core5.useMantineColorScheme)();
|
|
461
|
+
const computedColorScheme = (0, import_core5.useComputedColorScheme)("light", { getInitialValueInEffect: true });
|
|
462
|
+
const { t } = (0, import_gds_theme2.useGdsTranslation)();
|
|
463
|
+
const toggleColorScheme = () => {
|
|
464
|
+
setColorScheme(computedColorScheme === "dark" ? "light" : "dark");
|
|
465
|
+
};
|
|
466
|
+
const isDark = computedColorScheme === "dark";
|
|
467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
468
|
+
import_core5.ActionIcon,
|
|
469
|
+
{
|
|
470
|
+
onClick: toggleColorScheme,
|
|
471
|
+
variant: "default",
|
|
472
|
+
size,
|
|
473
|
+
"aria-label": t("gds.aria.themeToggle", "Toggle color scheme"),
|
|
474
|
+
children: isDark ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GdsIcons.Sun, { size: "1.2rem" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GdsIcons.Moon, { size: "1.2rem" })
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// src/AccentPanel.tsx
|
|
480
|
+
var import_core6 = require("@mantine/core");
|
|
481
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
482
|
+
var toneStyles = {
|
|
483
|
+
gray: {
|
|
484
|
+
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
485
|
+
border: "light-dark(var(--mantine-color-gray-2), color-mix(in srgb, var(--mantine-color-gray-4) 70%, transparent))",
|
|
486
|
+
color: "light-dark(var(--mantine-color-gray-9), var(--mantine-color-gray-0))"
|
|
487
|
+
},
|
|
488
|
+
violet: {
|
|
489
|
+
bg: "light-dark(var(--mantine-color-violet-0), color-mix(in srgb, var(--mantine-color-violet-9) 70%, black))",
|
|
490
|
+
border: "light-dark(var(--mantine-color-violet-2), color-mix(in srgb, var(--mantine-color-violet-4) 75%, transparent))",
|
|
491
|
+
color: "light-dark(var(--mantine-color-violet-9), var(--mantine-color-violet-0))"
|
|
492
|
+
},
|
|
493
|
+
green: {
|
|
494
|
+
bg: "light-dark(var(--mantine-color-green-0), color-mix(in srgb, var(--mantine-color-green-9) 72%, black))",
|
|
495
|
+
border: "light-dark(var(--mantine-color-green-2), color-mix(in srgb, var(--mantine-color-green-4) 78%, transparent))",
|
|
496
|
+
color: "light-dark(var(--mantine-color-green-9), var(--mantine-color-green-0))"
|
|
497
|
+
},
|
|
498
|
+
red: {
|
|
499
|
+
bg: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 72%, black))",
|
|
500
|
+
border: "light-dark(var(--mantine-color-red-2), color-mix(in srgb, var(--mantine-color-red-4) 78%, transparent))",
|
|
501
|
+
color: "light-dark(var(--mantine-color-red-9), var(--mantine-color-red-0))"
|
|
502
|
+
},
|
|
503
|
+
amber: {
|
|
504
|
+
bg: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-8) 78%, black))",
|
|
505
|
+
border: "light-dark(var(--mantine-color-yellow-3), color-mix(in srgb, var(--mantine-color-yellow-5) 70%, transparent))",
|
|
506
|
+
color: "light-dark(var(--mantine-color-yellow-9), var(--mantine-color-yellow-0))"
|
|
507
|
+
},
|
|
508
|
+
blue: {
|
|
509
|
+
bg: "light-dark(var(--mantine-color-blue-0), color-mix(in srgb, var(--mantine-color-blue-9) 74%, black))",
|
|
510
|
+
border: "light-dark(var(--mantine-color-blue-2), color-mix(in srgb, var(--mantine-color-blue-4) 75%, transparent))",
|
|
511
|
+
color: "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-0))"
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
function resolveAccentPanelStyles(tone = "violet", variant = "subtle") {
|
|
515
|
+
const token = toneStyles[tone];
|
|
516
|
+
if (variant === "soft-outline") {
|
|
517
|
+
return {
|
|
518
|
+
backgroundColor: "light-dark(var(--mantine-color-body), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
519
|
+
border: `1px solid ${token.border}`,
|
|
520
|
+
color: token.color
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
return {
|
|
524
|
+
backgroundColor: token.bg,
|
|
525
|
+
border: `1px solid ${token.border}`,
|
|
526
|
+
color: token.color
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
function AccentPanel({
|
|
530
|
+
tone = "violet",
|
|
531
|
+
variant = "subtle",
|
|
532
|
+
title,
|
|
533
|
+
badge,
|
|
534
|
+
children
|
|
535
|
+
}) {
|
|
536
|
+
const styles = resolveAccentPanelStyles(tone, variant);
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Paper, { withBorder: true, radius: "lg", p: "lg", style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core6.Stack, { gap: "sm", children: [
|
|
538
|
+
title || badge ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core6.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
539
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Title, { order: 4, c: "inherit", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Box, {}),
|
|
540
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Badge, { color: tone === "amber" ? "yellow" : tone, variant: "filled", children: badge }) : badge : null
|
|
541
|
+
] }) : null,
|
|
542
|
+
typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Text, { c: "inherit", children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core6.Box, { c: "inherit", children })
|
|
543
|
+
] }) });
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// src/ReferenceLocaleNotice.tsx
|
|
547
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
548
|
+
function ReferenceLocaleNotice({ localeLabel, detail }) {
|
|
549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AccentPanel, { tone: "amber", variant: "soft-outline", title: "Localization status", badge: localeLabel, children: detail });
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// src/ReferenceLinkGrid.tsx
|
|
553
|
+
var import_core7 = require("@mantine/core");
|
|
554
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
555
|
+
function ReferenceLinkGrid({
|
|
556
|
+
items,
|
|
557
|
+
columns = 3
|
|
558
|
+
}) {
|
|
559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), xl: columns }, spacing: "lg", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core7.Stack, { gap: "md", children: [
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core7.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core7.Stack, { gap: 6, maw: 540, children: [
|
|
562
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Title, { order: 4, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Anchor, { href: item.href, underline: "never", children: item.title }) }),
|
|
563
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Text, { size: "sm", c: "dimmed", children: item.description })
|
|
564
|
+
] }),
|
|
565
|
+
item.badge ? typeof item.badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Badge, { variant: "light", color: "violet", children: item.badge }) : item.badge : null
|
|
566
|
+
] }),
|
|
567
|
+
item.meta ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Text, { size: "sm", c: "dimmed", children: item.meta }) : null,
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Anchor, { href: item.href, fw: 600, children: "Open section" })
|
|
569
|
+
] }) }, item.id)) });
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// src/ReferenceSection.tsx
|
|
573
|
+
var import_core9 = require("@mantine/core");
|
|
574
|
+
|
|
575
|
+
// src/SectionPanel.tsx
|
|
576
|
+
var import_core8 = require("@mantine/core");
|
|
577
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
578
|
+
var toneBackgrounds = {
|
|
579
|
+
default: "var(--mantine-color-body)",
|
|
580
|
+
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
581
|
+
warning: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-9) 18%, var(--mantine-color-body)))",
|
|
582
|
+
critical: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 18%, var(--mantine-color-body)))"
|
|
583
|
+
};
|
|
584
|
+
function SectionPanel({
|
|
585
|
+
title,
|
|
586
|
+
description,
|
|
587
|
+
action,
|
|
588
|
+
children,
|
|
589
|
+
tone = "default",
|
|
590
|
+
id,
|
|
591
|
+
divided = true
|
|
592
|
+
}) {
|
|
593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Paper, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Stack, { gap: "md", children: [
|
|
594
|
+
title || description || action ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
595
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
596
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Stack, { gap: 4, children: [
|
|
597
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Title, { order: 3, children: title }) : null,
|
|
598
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
599
|
+
] }) : null,
|
|
600
|
+
action
|
|
601
|
+
] }),
|
|
602
|
+
divided ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Divider, {}) : null
|
|
603
|
+
] }) : null,
|
|
604
|
+
children
|
|
605
|
+
] }) });
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// src/ReferenceSection.tsx
|
|
609
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
610
|
+
function ReferenceSection({
|
|
611
|
+
title,
|
|
612
|
+
description,
|
|
613
|
+
eyebrow,
|
|
614
|
+
action,
|
|
615
|
+
href,
|
|
616
|
+
linkLabel = "Open section",
|
|
617
|
+
tone = "default",
|
|
618
|
+
children
|
|
619
|
+
}) {
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
621
|
+
SectionPanel,
|
|
622
|
+
{
|
|
623
|
+
tone,
|
|
624
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Stack, { gap: 4, children: [
|
|
625
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
626
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
627
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Stack, { gap: 4, children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { component: "span", fw: 700, size: "xl", children: title }),
|
|
629
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
630
|
+
] }),
|
|
631
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Anchor, { href, fw: 600, children: linkLabel }) : null
|
|
632
|
+
] })
|
|
633
|
+
] }),
|
|
634
|
+
action,
|
|
635
|
+
divided: false,
|
|
636
|
+
children
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// src/ReferenceThemeExplorer.tsx
|
|
642
|
+
var import_react2 = require("react");
|
|
643
|
+
var import_core14 = require("@mantine/core");
|
|
644
|
+
|
|
645
|
+
// src/ActionBar.tsx
|
|
646
|
+
var import_core10 = require("@mantine/core");
|
|
647
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
648
|
+
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
649
|
+
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
650
|
+
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
651
|
+
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
652
|
+
const Icon = config.icon;
|
|
653
|
+
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
655
|
+
import_core10.Button,
|
|
656
|
+
{
|
|
657
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { size: "1rem", stroke: 1.75 }),
|
|
658
|
+
"aria-label": ariaLabel ?? label,
|
|
659
|
+
variant: variant ?? fallbackVariant,
|
|
660
|
+
...props,
|
|
661
|
+
children: label
|
|
662
|
+
},
|
|
663
|
+
`${slot}-${actionId}`
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
function ActionBar({
|
|
667
|
+
primary,
|
|
668
|
+
secondary = [],
|
|
669
|
+
tertiary = [],
|
|
670
|
+
iconOnly = [],
|
|
671
|
+
gap = "sm",
|
|
672
|
+
vocabularyPacks = []
|
|
673
|
+
}) {
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Stack, { gap, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { gap, wrap: "wrap", children: [
|
|
676
|
+
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
677
|
+
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
678
|
+
] }),
|
|
679
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core10.Group, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
680
|
+
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
681
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
682
|
+
const Icon = config.icon;
|
|
683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
684
|
+
import_core10.ActionIcon,
|
|
685
|
+
{
|
|
686
|
+
variant: "subtle",
|
|
687
|
+
size: "lg",
|
|
688
|
+
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
689
|
+
...props,
|
|
690
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
691
|
+
},
|
|
692
|
+
`icon-${action}`
|
|
693
|
+
);
|
|
694
|
+
}),
|
|
695
|
+
primary ? renderSemanticAction(primary, "primary", vocabularyPacks) : null
|
|
696
|
+
] })
|
|
697
|
+
] }) });
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// src/FormField.tsx
|
|
701
|
+
var import_core11 = require("@mantine/core");
|
|
702
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
703
|
+
function FormField({ label, description, error, children }) {
|
|
704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Box, { component: "label", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 4, children: [
|
|
705
|
+
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
706
|
+
description ? typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
707
|
+
children,
|
|
708
|
+
error ? typeof error === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", c: "red.7", children: error }) : error : null
|
|
709
|
+
] }) });
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// src/ListingCard.tsx
|
|
713
|
+
var import_core12 = require("@mantine/core");
|
|
714
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
715
|
+
var ratioMap = {
|
|
716
|
+
"1:1": 1,
|
|
717
|
+
"4:3": 4 / 3,
|
|
718
|
+
"16:9": 16 / 9
|
|
719
|
+
};
|
|
720
|
+
var toneColorMap = {
|
|
721
|
+
default: void 0,
|
|
722
|
+
positive: "teal",
|
|
723
|
+
warning: "orange",
|
|
724
|
+
muted: "gray"
|
|
725
|
+
};
|
|
726
|
+
function ListingImageFallback({ mediaRatio }) {
|
|
727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
728
|
+
import_core12.ThemeIcon,
|
|
729
|
+
{
|
|
730
|
+
size: "100%",
|
|
731
|
+
radius: "md",
|
|
732
|
+
variant: "light",
|
|
733
|
+
color: "gray",
|
|
734
|
+
"aria-label": "No listing image available",
|
|
735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GdsIcons.Gallery, { size: "2rem" })
|
|
736
|
+
}
|
|
737
|
+
) });
|
|
738
|
+
}
|
|
739
|
+
function ListingAffordance({ affordance }) {
|
|
740
|
+
const config = GdsVocabulary[affordance.action];
|
|
741
|
+
const Icon = config.icon;
|
|
742
|
+
const label = affordance.ariaLabel ?? getSemanticActionLabel(affordance.action);
|
|
743
|
+
if (affordance.href) {
|
|
744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
745
|
+
import_core12.ActionIcon,
|
|
746
|
+
{
|
|
747
|
+
component: "a",
|
|
748
|
+
href: affordance.href,
|
|
749
|
+
variant: "subtle",
|
|
750
|
+
size: "lg",
|
|
751
|
+
"aria-label": label,
|
|
752
|
+
disabled: affordance.disabled,
|
|
753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
758
|
+
import_core12.ActionIcon,
|
|
759
|
+
{
|
|
760
|
+
variant: "subtle",
|
|
761
|
+
size: "lg",
|
|
762
|
+
"aria-label": label,
|
|
763
|
+
onClick: affordance.onClick,
|
|
764
|
+
disabled: affordance.disabled,
|
|
765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
766
|
+
}
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
function ListingCard({
|
|
770
|
+
title,
|
|
771
|
+
href,
|
|
772
|
+
description,
|
|
773
|
+
image,
|
|
774
|
+
mediaRatio = "4:3",
|
|
775
|
+
metadata = [],
|
|
776
|
+
featured = false,
|
|
777
|
+
sponsoredDisclosure,
|
|
778
|
+
price,
|
|
779
|
+
primaryAction,
|
|
780
|
+
saveAction,
|
|
781
|
+
shareAction,
|
|
782
|
+
compact = false
|
|
783
|
+
}) {
|
|
784
|
+
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: compact ? "sm" : "md", children: [
|
|
786
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ListingImageFallback, { mediaRatio }),
|
|
787
|
+
featured || sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
788
|
+
featured ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Badge, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", {}),
|
|
789
|
+
sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
790
|
+
] }) : null,
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: 4, children: [
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Title, { order: compact ? 5 : 4, lineClamp: 2, children: titleContent }),
|
|
793
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
794
|
+
] }),
|
|
795
|
+
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Stack, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { gap: "xs", wrap: "nowrap", style: { minWidth: 0, flex: 1 }, children: [
|
|
797
|
+
item.icon,
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: item.tone ? toneColorMap[item.tone] : "dimmed", lineClamp: 1, children: item.label })
|
|
799
|
+
] }),
|
|
800
|
+
item.value ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", fw: 500, ta: "right", children: item.value }) : null
|
|
801
|
+
] }, item.id)) }) : null,
|
|
802
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", align: "center", gap: "sm", wrap: "wrap", children: [
|
|
803
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: price ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { fw: 700, size: compact ? "md" : "lg", children: price }) : null }),
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
805
|
+
saveAction ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ListingAffordance, { affordance: saveAction }) : null,
|
|
806
|
+
shareAction ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ListingAffordance, { affordance: shareAction }) : null,
|
|
807
|
+
primaryAction
|
|
808
|
+
] })
|
|
809
|
+
] })
|
|
810
|
+
] }) });
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// src/StateBlock.tsx
|
|
814
|
+
var import_core13 = require("@mantine/core");
|
|
815
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
816
|
+
var variantConfig = {
|
|
817
|
+
loading: { color: "violet", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Loader, { size: "sm" }) },
|
|
818
|
+
empty: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
819
|
+
error: { color: "red", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
820
|
+
permission: { color: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
821
|
+
disabled: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
822
|
+
success: { color: "teal", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Success, { size: "1.1rem" }) },
|
|
823
|
+
info: { color: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Info, { size: "1.1rem" }) },
|
|
824
|
+
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
825
|
+
};
|
|
826
|
+
function StateBlock({
|
|
827
|
+
variant,
|
|
828
|
+
title,
|
|
829
|
+
description,
|
|
830
|
+
action,
|
|
831
|
+
icon,
|
|
832
|
+
compact = false
|
|
833
|
+
}) {
|
|
834
|
+
const config = variantConfig[variant];
|
|
835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
836
|
+
import_core13.Stack,
|
|
837
|
+
{
|
|
838
|
+
align: compact ? "flex-start" : "center",
|
|
839
|
+
justify: "center",
|
|
840
|
+
gap: "md",
|
|
841
|
+
py: compact ? "md" : "xl",
|
|
842
|
+
ta: compact ? "left" : "center",
|
|
843
|
+
children: [
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.ThemeIcon, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Title, { order: compact ? 4 : 3, children: title }),
|
|
847
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
848
|
+
] }),
|
|
849
|
+
action
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// src/ReferenceThemeExplorer.tsx
|
|
856
|
+
var import_gds_theme3 = require("@doneisbetter/gds-theme");
|
|
857
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
858
|
+
var themePresetCatalog = {
|
|
859
|
+
default: {
|
|
860
|
+
label: "Default runtime theme",
|
|
861
|
+
bestFor: "Balanced multi-surface products that need the baseline GDS system.",
|
|
862
|
+
summary: "The default shared runtime lane for most adopters.",
|
|
863
|
+
themeKey: "gdsTheme"
|
|
864
|
+
},
|
|
865
|
+
"dark-public": {
|
|
866
|
+
label: "Dark public theme",
|
|
867
|
+
bestFor: "Dark-first public experiences and campaign-style landing surfaces.",
|
|
868
|
+
summary: "A darker public presentation lane with the shipped runtime rhythm intact.",
|
|
869
|
+
themeKey: "gdsDarkPublicTheme"
|
|
870
|
+
},
|
|
871
|
+
"flat-surface": {
|
|
872
|
+
label: "Flat surface theme",
|
|
873
|
+
bestFor: "Operational products that prefer quieter elevation and flatter surface contrast.",
|
|
874
|
+
summary: "Removes some visual weight without creating a second token authority.",
|
|
875
|
+
themeKey: "gdsFlatSurfaceTheme"
|
|
876
|
+
},
|
|
877
|
+
editorial: {
|
|
878
|
+
label: "Editorial serif theme",
|
|
879
|
+
bestFor: "Documentation, editorial, and content-led experiences.",
|
|
880
|
+
summary: "Adds a more expressive public reading tone while staying inside GDS contracts.",
|
|
881
|
+
themeKey: "gdsEditorialPublicTheme"
|
|
882
|
+
},
|
|
883
|
+
brand: {
|
|
884
|
+
label: "Brand theme generator",
|
|
885
|
+
bestFor: "Consumer teams that need controlled brand expression without forking the system.",
|
|
886
|
+
summary: "Composes the shipped helpers into a governed product-authored theme lane.",
|
|
887
|
+
themeKey: "createPublicBrandTheme(...)"
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
function ThemePreviewSurface({
|
|
891
|
+
preset,
|
|
892
|
+
colorScheme
|
|
893
|
+
}) {
|
|
894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "lg", children: [
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { justify: "space-between", align: "flex-start", wrap: "wrap", children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: 4, children: [
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { fw: 700, children: preset.label }),
|
|
898
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: preset.summary }),
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Text, { size: "sm", children: [
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "Best for:" }),
|
|
901
|
+
" ",
|
|
902
|
+
preset.bestFor
|
|
903
|
+
] }),
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Text, { size: "sm", children: [
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "Color scheme:" }),
|
|
906
|
+
" ",
|
|
907
|
+
colorScheme
|
|
908
|
+
] })
|
|
909
|
+
] }),
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemeToggle, {})
|
|
911
|
+
] }),
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
913
|
+
ActionBar,
|
|
914
|
+
{
|
|
915
|
+
primary: { action: "save", size: "sm" },
|
|
916
|
+
secondary: [{ action: "cancel", size: "sm" }],
|
|
917
|
+
tertiary: [{ action: "preview", size: "sm" }]
|
|
918
|
+
}
|
|
919
|
+
),
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.SimpleGrid, { cols: { base: 1, md: 2 }, spacing: "md", children: [
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "sm", children: [
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { fw: 700, size: "sm", children: "Token-backed controls" }),
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { label: "Reference input", description: "Inputs stay inside the theme lane instead of drifting into route-local styling.", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.TextInput, { placeholder: "Search or type a route name" }) }),
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { gap: "xs", wrap: "wrap", children: [
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Badge, { color: "teal", variant: "light", children: "Success" }),
|
|
926
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Badge, { color: "orange", variant: "light", children: "Warning" }),
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Badge, { color: "red", variant: "light", children: "Critical" })
|
|
928
|
+
] })
|
|
929
|
+
] }) }),
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
931
|
+
ListingCard,
|
|
932
|
+
{
|
|
933
|
+
title: "Reference site proof surface",
|
|
934
|
+
description: "This preview uses the real shipped design-system runtime rather than a docs-only styling lane.",
|
|
935
|
+
metadata: [
|
|
936
|
+
{ id: "runtime", label: "Runtime lane", value: preset.themeKey },
|
|
937
|
+
{ id: "scheme", label: "Color scheme", value: colorScheme }
|
|
938
|
+
],
|
|
939
|
+
primaryAction: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Button, { size: "sm", children: "Inspect route" })
|
|
940
|
+
}
|
|
941
|
+
)
|
|
942
|
+
] })
|
|
943
|
+
] }) });
|
|
944
|
+
}
|
|
945
|
+
function ReferenceThemeExplorer() {
|
|
946
|
+
const [preset, setPreset] = (0, import_react2.useState)("default");
|
|
947
|
+
const [colorScheme, setColorScheme] = (0, import_react2.useState)("light");
|
|
948
|
+
const [brandPrimary, setBrandPrimary] = (0, import_react2.useState)("blue");
|
|
949
|
+
const [brandFlatSurfaces, setBrandFlatSurfaces] = (0, import_react2.useState)(true);
|
|
950
|
+
const [brandEditorialSerif, setBrandEditorialSerif] = (0, import_react2.useState)(false);
|
|
951
|
+
const [comparisonEnabled, setComparisonEnabled] = (0, import_react2.useState)(false);
|
|
952
|
+
const [comparisonPreset, setComparisonPreset] = (0, import_react2.useState)("editorial");
|
|
953
|
+
const resolveTheme = (presetId) => {
|
|
954
|
+
switch (presetId) {
|
|
955
|
+
case "dark-public":
|
|
956
|
+
return import_gds_theme3.gdsDarkPublicTheme;
|
|
957
|
+
case "flat-surface":
|
|
958
|
+
return import_gds_theme3.gdsFlatSurfaceTheme;
|
|
959
|
+
case "editorial":
|
|
960
|
+
return import_gds_theme3.gdsEditorialPublicTheme;
|
|
961
|
+
case "brand":
|
|
962
|
+
return (0, import_gds_theme3.createPublicBrandTheme)({
|
|
963
|
+
flatSurfaces: brandFlatSurfaces,
|
|
964
|
+
editorialSerif: brandEditorialSerif,
|
|
965
|
+
overrides: { primaryColor: brandPrimary }
|
|
966
|
+
});
|
|
967
|
+
default:
|
|
968
|
+
return import_gds_theme3.gdsTheme;
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
const selectionSummary = themePresetCatalog[preset];
|
|
972
|
+
const comparisonSummary = themePresetCatalog[comparisonPreset];
|
|
973
|
+
const selectedTheme = (0, import_react2.useMemo)(() => resolveTheme(preset), [preset, brandPrimary, brandFlatSurfaces, brandEditorialSerif]);
|
|
974
|
+
const comparedTheme = (0, import_react2.useMemo)(() => resolveTheme(comparisonPreset), [comparisonPreset, brandPrimary, brandFlatSurfaces, brandEditorialSerif]);
|
|
975
|
+
const previewKey = `${preset}-${colorScheme}-${brandPrimary}-${brandFlatSurfaces}-${brandEditorialSerif}`;
|
|
976
|
+
const comparisonPreviewKey = `${comparisonPreset}-${colorScheme}-${brandPrimary}-${brandFlatSurfaces}-${brandEditorialSerif}`;
|
|
977
|
+
const reset = () => {
|
|
978
|
+
setPreset("default");
|
|
979
|
+
setColorScheme("light");
|
|
980
|
+
setBrandPrimary("blue");
|
|
981
|
+
setBrandFlatSurfaces(true);
|
|
982
|
+
setBrandEditorialSerif(false);
|
|
983
|
+
setComparisonEnabled(false);
|
|
984
|
+
setComparisonPreset("editorial");
|
|
985
|
+
};
|
|
986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "xl", children: [
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
988
|
+
ReferenceSection,
|
|
989
|
+
{
|
|
990
|
+
title: "Theme Lab",
|
|
991
|
+
description: "Test the actual shipped GDS theme presets, color-scheme behavior, and the governed brand-theme generator. This page is part of the live demo, not a separate styling experiment.",
|
|
992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.SimpleGrid, { cols: { base: 1, md: 2, xl: 3 }, spacing: "lg", children: [
|
|
993
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "md", children: [
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Title, { order: 4, children: "Theme preset" }),
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { label: "Preset", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
996
|
+
import_core14.NativeSelect,
|
|
997
|
+
{
|
|
998
|
+
"aria-label": "Preset",
|
|
999
|
+
value: preset,
|
|
1000
|
+
onChange: (event) => setPreset(event.currentTarget.value || "default"),
|
|
1001
|
+
data: Object.entries(themePresetCatalog).map(([value, item]) => ({ value, label: item.label }))
|
|
1002
|
+
}
|
|
1003
|
+
) }),
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { label: "Preview color scheme", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1005
|
+
import_core14.NativeSelect,
|
|
1006
|
+
{
|
|
1007
|
+
"aria-label": "Preview color scheme",
|
|
1008
|
+
value: colorScheme,
|
|
1009
|
+
onChange: (event) => setColorScheme(event.currentTarget.value || "light"),
|
|
1010
|
+
data: [
|
|
1011
|
+
{ value: "light", label: "Light" },
|
|
1012
|
+
{ value: "dark", label: "Dark" },
|
|
1013
|
+
{ value: "auto", label: "Auto" }
|
|
1014
|
+
]
|
|
1015
|
+
}
|
|
1016
|
+
) }),
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Button, { variant: "default", size: "sm", onClick: reset, children: "Reset theme lab" }),
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: "The reference site remounts an isolated provider here so visitors can test shipped presets without changing the whole docs shell." })
|
|
1019
|
+
] }) }),
|
|
1020
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "md", children: [
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Title, { order: 4, children: "Brand builder options" }),
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { label: "Brand primary color", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1023
|
+
import_core14.NativeSelect,
|
|
1024
|
+
{
|
|
1025
|
+
"aria-label": "Brand primary color",
|
|
1026
|
+
value: brandPrimary,
|
|
1027
|
+
onChange: (event) => setBrandPrimary(event.currentTarget.value || "blue"),
|
|
1028
|
+
data: ["blue", "violet", "teal", "grape", "indigo", "orange"],
|
|
1029
|
+
disabled: preset !== "brand"
|
|
1030
|
+
}
|
|
1031
|
+
) }),
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1033
|
+
import_core14.Checkbox,
|
|
1034
|
+
{
|
|
1035
|
+
label: "Use flat surfaces",
|
|
1036
|
+
checked: brandFlatSurfaces,
|
|
1037
|
+
onChange: (event) => setBrandFlatSurfaces(event.currentTarget.checked),
|
|
1038
|
+
disabled: preset !== "brand"
|
|
1039
|
+
}
|
|
1040
|
+
),
|
|
1041
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1042
|
+
import_core14.Checkbox,
|
|
1043
|
+
{
|
|
1044
|
+
label: "Use editorial serif headings",
|
|
1045
|
+
checked: brandEditorialSerif,
|
|
1046
|
+
onChange: (event) => setBrandEditorialSerif(event.currentTarget.checked),
|
|
1047
|
+
disabled: preset !== "brand"
|
|
1048
|
+
}
|
|
1049
|
+
),
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: "The generator composes shipped helpers instead of creating a second theme authority inside the website." })
|
|
1051
|
+
] }) }),
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "md", children: [
|
|
1053
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Title, { order: 4, children: "Current selection summary" }),
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: 6, children: [
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { fw: 700, children: selectionSummary.label }),
|
|
1056
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: selectionSummary.summary }),
|
|
1057
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Text, { size: "sm", children: [
|
|
1058
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "Best for:" }),
|
|
1059
|
+
" ",
|
|
1060
|
+
selectionSummary.bestFor
|
|
1061
|
+
] }),
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Text, { size: "sm", children: [
|
|
1063
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "Runtime lane:" }),
|
|
1064
|
+
" ",
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Code, { children: selectionSummary.themeKey })
|
|
1066
|
+
] }),
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Text, { size: "sm", children: [
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "Color scheme:" }),
|
|
1069
|
+
" ",
|
|
1070
|
+
colorScheme
|
|
1071
|
+
] })
|
|
1072
|
+
] }),
|
|
1073
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1074
|
+
import_core14.Checkbox,
|
|
1075
|
+
{
|
|
1076
|
+
"aria-label": "Compare against a second shipped preset",
|
|
1077
|
+
label: "Compare against a second shipped preset",
|
|
1078
|
+
checked: comparisonEnabled,
|
|
1079
|
+
onChange: (event) => setComparisonEnabled(event.currentTarget.checked)
|
|
1080
|
+
}
|
|
1081
|
+
),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { label: "Comparison preset", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1083
|
+
import_core14.NativeSelect,
|
|
1084
|
+
{
|
|
1085
|
+
"aria-label": "Comparison preset",
|
|
1086
|
+
value: comparisonPreset,
|
|
1087
|
+
onChange: (event) => setComparisonPreset(event.currentTarget.value || "editorial"),
|
|
1088
|
+
disabled: !comparisonEnabled,
|
|
1089
|
+
data: Object.entries(themePresetCatalog).filter(([value]) => value !== preset).map(([value, item]) => ({ value, label: item.label }))
|
|
1090
|
+
}
|
|
1091
|
+
) })
|
|
1092
|
+
] }) })
|
|
1093
|
+
] })
|
|
1094
|
+
}
|
|
1095
|
+
),
|
|
1096
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1097
|
+
ReferenceSection,
|
|
1098
|
+
{
|
|
1099
|
+
title: "Shipped theme lanes",
|
|
1100
|
+
description: "Every lane below is part of the supported system. The website uses these exact helpers as its live runtime proof.",
|
|
1101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.SimpleGrid, { cols: { base: 1, md: 2, xl: 5 }, spacing: "md", children: Object.values(themePresetCatalog).map((lane) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: 6, children: [
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { fw: 700, size: "sm", children: lane.label }),
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: lane.summary }),
|
|
1104
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Code, { block: true, fz: "10px", children: lane.themeKey })
|
|
1105
|
+
] }) }, lane.themeKey)) })
|
|
1106
|
+
}
|
|
1107
|
+
),
|
|
1108
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1109
|
+
ReferenceSection,
|
|
1110
|
+
{
|
|
1111
|
+
title: "Live Theme Preview",
|
|
1112
|
+
description: "Visitors can test the shipped presets, compare lanes, and inspect actual GDS surfaces under each theme.",
|
|
1113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.SimpleGrid, { cols: { base: 1, xl: comparisonEnabled ? 2 : 1 }, spacing: "lg", children: [
|
|
1114
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_gds_theme3.GdsProvider, { theme: selectedTheme, defaultColorScheme: colorScheme, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemePreviewSurface, { preset: selectionSummary, colorScheme }) }, previewKey),
|
|
1115
|
+
comparisonEnabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_gds_theme3.GdsProvider, { theme: comparedTheme, defaultColorScheme: colorScheme, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "md", children: [
|
|
1116
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { justify: "space-between", align: "flex-start", wrap: "wrap", children: [
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: 4, children: [
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { fw: 700, children: "Comparison Preview Surface" }),
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Text, { size: "sm", c: "dimmed", children: "Compare another shipped theme against the current selection before adopting it downstream." })
|
|
1120
|
+
] }),
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Badge, { color: "violet", variant: "light", children: comparisonSummary.label })
|
|
1122
|
+
] }),
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemePreviewSurface, { preset: comparisonSummary, colorScheme })
|
|
1124
|
+
] }) }) }, comparisonPreviewKey) : null
|
|
1125
|
+
] })
|
|
1126
|
+
}
|
|
1127
|
+
),
|
|
1128
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1129
|
+
ReferenceSection,
|
|
1130
|
+
{
|
|
1131
|
+
title: "Creator-Authored Experience Boundary",
|
|
1132
|
+
description: "Creator-authored expression is allowed only through the sanctioned theme helpers and narrow exception process.",
|
|
1133
|
+
tone: "supporting",
|
|
1134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1135
|
+
StateBlock,
|
|
1136
|
+
{
|
|
1137
|
+
variant: "info",
|
|
1138
|
+
title: "Shipped first, custom second",
|
|
1139
|
+
description: "The official site uses shipped presets and the public brand generator first. Product-authored overrides must stay reviewable, testable, and scoped.",
|
|
1140
|
+
compact: true
|
|
1141
|
+
}
|
|
1142
|
+
)
|
|
1143
|
+
}
|
|
1144
|
+
)
|
|
1145
|
+
] });
|
|
1146
|
+
}
|
|
1147
|
+
|
|
423
1148
|
// src/ChoiceChip.tsx
|
|
424
|
-
var
|
|
425
|
-
var
|
|
1149
|
+
var import_core15 = require("@mantine/core");
|
|
1150
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
426
1151
|
function ChoiceChip({
|
|
427
1152
|
label,
|
|
428
1153
|
active = false,
|
|
@@ -439,8 +1164,8 @@ function ChoiceChip({
|
|
|
439
1164
|
};
|
|
440
1165
|
if (href) {
|
|
441
1166
|
const LinkComponent = component || "a";
|
|
442
|
-
return /* @__PURE__ */ (0,
|
|
443
|
-
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1168
|
+
import_core15.Badge,
|
|
444
1169
|
{
|
|
445
1170
|
component: LinkComponent,
|
|
446
1171
|
href,
|
|
@@ -452,8 +1177,8 @@ function ChoiceChip({
|
|
|
452
1177
|
}
|
|
453
1178
|
if (onClick || component) {
|
|
454
1179
|
const ButtonComponent = component || "button";
|
|
455
|
-
return /* @__PURE__ */ (0,
|
|
456
|
-
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1181
|
+
import_core15.Badge,
|
|
457
1182
|
{
|
|
458
1183
|
component: ButtonComponent,
|
|
459
1184
|
type: component ? void 0 : "button",
|
|
@@ -464,37 +1189,37 @@ function ChoiceChip({
|
|
|
464
1189
|
}
|
|
465
1190
|
);
|
|
466
1191
|
}
|
|
467
|
-
return /* @__PURE__ */ (0,
|
|
1192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Badge, { ...sharedProps, children: label });
|
|
468
1193
|
}
|
|
469
1194
|
|
|
470
1195
|
// src/MetricCard.tsx
|
|
471
|
-
var
|
|
472
|
-
var
|
|
1196
|
+
var import_core16 = require("@mantine/core");
|
|
1197
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
473
1198
|
var trendColors = {
|
|
474
1199
|
positive: "teal",
|
|
475
1200
|
negative: "red",
|
|
476
1201
|
neutral: "gray"
|
|
477
1202
|
};
|
|
478
1203
|
function MetricCard({ label, value, description, trend, icon, footer }) {
|
|
479
|
-
return /* @__PURE__ */ (0,
|
|
480
|
-
/* @__PURE__ */ (0,
|
|
481
|
-
/* @__PURE__ */ (0,
|
|
482
|
-
/* @__PURE__ */ (0,
|
|
483
|
-
/* @__PURE__ */ (0,
|
|
1204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "md", children: [
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: 4, children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Title, { order: 3, children: value })
|
|
484
1209
|
] }),
|
|
485
|
-
icon ? /* @__PURE__ */ (0,
|
|
1210
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null
|
|
486
1211
|
] }),
|
|
487
|
-
description || trend ? /* @__PURE__ */ (0,
|
|
488
|
-
description ? /* @__PURE__ */ (0,
|
|
489
|
-
trend ? /* @__PURE__ */ (0,
|
|
1212
|
+
description || trend ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Group, { justify: "space-between", align: "center", gap: "sm", children: [
|
|
1213
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", c: "dimmed", flex: 1, children: description }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
1214
|
+
trend ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Badge, { color: trendColors[trend.tone ?? "neutral"], variant: "light", children: trend.label }) : null
|
|
490
1215
|
] }) : null,
|
|
491
1216
|
footer
|
|
492
1217
|
] }) });
|
|
493
1218
|
}
|
|
494
1219
|
|
|
495
1220
|
// src/ProgressCard.tsx
|
|
496
|
-
var
|
|
497
|
-
var
|
|
1221
|
+
var import_core17 = require("@mantine/core");
|
|
1222
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
498
1223
|
function ProgressCard({
|
|
499
1224
|
label,
|
|
500
1225
|
value,
|
|
@@ -503,63 +1228,30 @@ function ProgressCard({
|
|
|
503
1228
|
description,
|
|
504
1229
|
action
|
|
505
1230
|
}) {
|
|
506
|
-
return /* @__PURE__ */ (0,
|
|
507
|
-
/* @__PURE__ */ (0,
|
|
508
|
-
/* @__PURE__ */ (0,
|
|
509
|
-
/* @__PURE__ */ (0,
|
|
510
|
-
/* @__PURE__ */ (0,
|
|
1231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Stack, { gap: "md", children: [
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Group, { justify: "space-between", align: "flex-start", children: [
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Stack, { gap: 4, children: [
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Text, { size: "sm", c: "dimmed", fw: 600, children: label }),
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Title, { order: 3, children: value })
|
|
511
1236
|
] }),
|
|
512
1237
|
action
|
|
513
1238
|
] }),
|
|
514
|
-
description ? /* @__PURE__ */ (0,
|
|
515
|
-
/* @__PURE__ */ (0,
|
|
516
|
-
/* @__PURE__ */ (0,
|
|
517
|
-
/* @__PURE__ */ (0,
|
|
518
|
-
/* @__PURE__ */ (0,
|
|
1239
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Stack, { gap: 6, children: [
|
|
1241
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Group, { justify: "space-between", gap: "sm", children: [
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Text, { size: "sm", fw: 500, children: progressLabel ?? "Progress" }),
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Text, { size: "sm", c: "dimmed", children: [
|
|
519
1244
|
Math.round(progress),
|
|
520
1245
|
"%"
|
|
521
1246
|
] })
|
|
522
1247
|
] }),
|
|
523
|
-
/* @__PURE__ */ (0,
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Progress, { value: progress, radius: "xl", size: "md" })
|
|
524
1249
|
] })
|
|
525
1250
|
] }) });
|
|
526
1251
|
}
|
|
527
1252
|
|
|
528
|
-
// src/SectionPanel.tsx
|
|
529
|
-
var import_core9 = require("@mantine/core");
|
|
530
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
531
|
-
var toneBackgrounds = {
|
|
532
|
-
default: "var(--mantine-color-body)",
|
|
533
|
-
supporting: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
534
|
-
warning: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-9) 18%, var(--mantine-color-body)))",
|
|
535
|
-
critical: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 18%, var(--mantine-color-body)))"
|
|
536
|
-
};
|
|
537
|
-
function SectionPanel({
|
|
538
|
-
title,
|
|
539
|
-
description,
|
|
540
|
-
action,
|
|
541
|
-
children,
|
|
542
|
-
tone = "default",
|
|
543
|
-
id,
|
|
544
|
-
divided = true
|
|
545
|
-
}) {
|
|
546
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Paper, { id, withBorder: true, radius: "xl", p: "lg", style: { background: toneBackgrounds[tone] }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Stack, { gap: "md", children: [
|
|
547
|
-
title || description || action ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
548
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
549
|
-
title || description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Stack, { gap: 4, children: [
|
|
550
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Title, { order: 3, children: title }) : null,
|
|
551
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
552
|
-
] }) : null,
|
|
553
|
-
action
|
|
554
|
-
] }),
|
|
555
|
-
divided ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Divider, {}) : null
|
|
556
|
-
] }) : null,
|
|
557
|
-
children
|
|
558
|
-
] }) });
|
|
559
|
-
}
|
|
560
|
-
|
|
561
1253
|
// src/ConsumerSection.tsx
|
|
562
|
-
var
|
|
1254
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
563
1255
|
function ConsumerSection({
|
|
564
1256
|
title,
|
|
565
1257
|
description,
|
|
@@ -567,23 +1259,23 @@ function ConsumerSection({
|
|
|
567
1259
|
children,
|
|
568
1260
|
tone = "default"
|
|
569
1261
|
}) {
|
|
570
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SectionPanel, { title, description, action, tone, children });
|
|
571
1263
|
}
|
|
572
1264
|
|
|
573
1265
|
// src/ConsumerDashboardGrid.tsx
|
|
574
|
-
var
|
|
575
|
-
var
|
|
1266
|
+
var import_core18 = require("@mantine/core");
|
|
1267
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
576
1268
|
function ConsumerDashboardGrid({
|
|
577
1269
|
children,
|
|
578
1270
|
columns = 3
|
|
579
1271
|
}) {
|
|
580
|
-
return /* @__PURE__ */ (0,
|
|
1272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children });
|
|
581
1273
|
}
|
|
582
1274
|
|
|
583
1275
|
// src/GameBoardTile.tsx
|
|
584
|
-
var
|
|
1276
|
+
var import_core19 = require("@mantine/core");
|
|
585
1277
|
var import_hooks = require("@mantine/hooks");
|
|
586
|
-
var
|
|
1278
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
587
1279
|
function GameBoardTile({
|
|
588
1280
|
face,
|
|
589
1281
|
revealed,
|
|
@@ -592,12 +1284,12 @@ function GameBoardTile({
|
|
|
592
1284
|
onPress,
|
|
593
1285
|
highlightColor
|
|
594
1286
|
}) {
|
|
595
|
-
const theme = (0,
|
|
1287
|
+
const theme = (0, import_core19.useMantineTheme)();
|
|
596
1288
|
const reduceMotion = (0, import_hooks.useMediaQuery)("(prefers-reduced-motion: reduce)");
|
|
597
1289
|
const highlighted = revealed && !matched;
|
|
598
1290
|
const revealBg = highlightColor ?? (typeof theme.primaryColor === "string" ? `${theme.primaryColor}.5` : "violet.5");
|
|
599
|
-
return /* @__PURE__ */ (0,
|
|
600
|
-
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core19.UnstyledButton, { w: "100%", disabled, onClick: onPress, "aria-pressed": revealed, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1292
|
+
import_core19.Paper,
|
|
601
1293
|
{
|
|
602
1294
|
withBorder: true,
|
|
603
1295
|
radius: "md",
|
|
@@ -612,14 +1304,14 @@ function GameBoardTile({
|
|
|
612
1304
|
transform: reduceMotion || !highlighted ? "scale(1)" : "scale(1.02)"
|
|
613
1305
|
}
|
|
614
1306
|
},
|
|
615
|
-
children: /* @__PURE__ */ (0,
|
|
1307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core19.Center, { h: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core19.Text, { size: "xl", fw: 700, children: face }) })
|
|
616
1308
|
}
|
|
617
1309
|
) });
|
|
618
1310
|
}
|
|
619
1311
|
|
|
620
1312
|
// src/EditorialCard.tsx
|
|
621
|
-
var
|
|
622
|
-
var
|
|
1313
|
+
var import_core20 = require("@mantine/core");
|
|
1314
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
623
1315
|
var tonePalette = {
|
|
624
1316
|
default: {
|
|
625
1317
|
accent: "violet",
|
|
@@ -639,8 +1331,8 @@ var tonePalette = {
|
|
|
639
1331
|
}
|
|
640
1332
|
};
|
|
641
1333
|
function EditorialMediaFallback({ compact }) {
|
|
642
|
-
return /* @__PURE__ */ (0,
|
|
643
|
-
|
|
1334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.AspectRatio, { ratio: compact ? 16 / 10 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1335
|
+
import_core20.Box,
|
|
644
1336
|
{
|
|
645
1337
|
style: {
|
|
646
1338
|
display: "grid",
|
|
@@ -650,7 +1342,7 @@ function EditorialMediaFallback({ compact }) {
|
|
|
650
1342
|
background: "var(--mantine-color-gray-0)",
|
|
651
1343
|
borderRadius: "var(--mantine-radius-md)"
|
|
652
1344
|
},
|
|
653
|
-
children: /* @__PURE__ */ (0,
|
|
1345
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
654
1346
|
}
|
|
655
1347
|
) });
|
|
656
1348
|
}
|
|
@@ -673,8 +1365,8 @@ function EditorialCard({
|
|
|
673
1365
|
const featured = variant === "featured";
|
|
674
1366
|
const palette = tonePalette[tone];
|
|
675
1367
|
const interactiveProps = href ? { component: "a", href } : onClick ? { component: "button", onClick, type: "button" } : {};
|
|
676
|
-
return /* @__PURE__ */ (0,
|
|
677
|
-
|
|
1368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1369
|
+
import_core20.Card,
|
|
678
1370
|
{
|
|
679
1371
|
className: classNames?.root,
|
|
680
1372
|
withBorder: true,
|
|
@@ -688,21 +1380,21 @@ function EditorialCard({
|
|
|
688
1380
|
cursor: href || onClick ? "pointer" : "default"
|
|
689
1381
|
},
|
|
690
1382
|
children: [
|
|
691
|
-
/* @__PURE__ */ (0,
|
|
692
|
-
/* @__PURE__ */ (0,
|
|
693
|
-
/* @__PURE__ */ (0,
|
|
694
|
-
/* @__PURE__ */ (0,
|
|
695
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
696
|
-
/* @__PURE__ */ (0,
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Card.Section, { className: classNames?.media, children: media ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EditorialMediaFallback, { compact }) }),
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core20.Stack, { gap: "md", p: compact ? "md" : "lg", className: classNames?.body, children: [
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core20.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core20.Stack, { gap: 4, flex: 1, children: [
|
|
1387
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Text, { size: "xs", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Title, { order: compact ? 4 : 3, className: classNames?.title, children: title })
|
|
697
1389
|
] }),
|
|
698
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */ (0,
|
|
1390
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Badge, { color: palette.accent, variant: "light", children: badge }) : badge : null
|
|
699
1391
|
] }),
|
|
700
|
-
description ? /* @__PURE__ */ (0,
|
|
701
|
-
meta ? /* @__PURE__ */ (0,
|
|
702
|
-
href || onClick || ctaLabel ? /* @__PURE__ */ (0,
|
|
703
|
-
/* @__PURE__ */ (0,
|
|
704
|
-
/* @__PURE__ */ (0,
|
|
705
|
-
|
|
1392
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1393
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Text, { size: "sm", c: "dimmed", className: classNames?.meta, children: meta }) : null,
|
|
1394
|
+
href || onClick || ctaLabel ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core20.Group, { gap: 6, c: `${palette.accent}.7`, className: classNames?.action, children: [
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core20.Text, { fw: 600, size: "sm", children: ctaLabel }),
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1397
|
+
import_core20.Anchor,
|
|
706
1398
|
{
|
|
707
1399
|
component: "span",
|
|
708
1400
|
underline: "never",
|
|
@@ -719,8 +1411,8 @@ function EditorialCard({
|
|
|
719
1411
|
}
|
|
720
1412
|
|
|
721
1413
|
// src/ProductCard.tsx
|
|
722
|
-
var
|
|
723
|
-
var
|
|
1414
|
+
var import_core21 = require("@mantine/core");
|
|
1415
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
724
1416
|
function ProductCard({
|
|
725
1417
|
title,
|
|
726
1418
|
description,
|
|
@@ -733,39 +1425,39 @@ function ProductCard({
|
|
|
733
1425
|
footer
|
|
734
1426
|
}) {
|
|
735
1427
|
const MoreIcon = GdsIcons.Menu;
|
|
736
|
-
return /* @__PURE__ */ (0,
|
|
1428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Stack, { gap: "md", children: [
|
|
737
1429
|
media,
|
|
738
|
-
/* @__PURE__ */ (0,
|
|
739
|
-
/* @__PURE__ */ (0,
|
|
740
|
-
icon ? /* @__PURE__ */ (0,
|
|
741
|
-
/* @__PURE__ */ (0,
|
|
742
|
-
/* @__PURE__ */ (0,
|
|
743
|
-
description ? /* @__PURE__ */ (0,
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Group, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1432
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null,
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Stack, { gap: 4, children: [
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Title, { order: 4, children: title }),
|
|
1435
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
744
1436
|
] })
|
|
745
1437
|
] }),
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
747
|
-
typeof status === "string" ? /* @__PURE__ */ (0,
|
|
748
|
-
secondaryActions.length ? /* @__PURE__ */ (0,
|
|
749
|
-
/* @__PURE__ */ (0,
|
|
750
|
-
/* @__PURE__ */ (0,
|
|
751
|
-
(action) => action.href ? /* @__PURE__ */ (0,
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Group, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
1439
|
+
typeof status === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Badge, { variant: "light", children: status }) : status,
|
|
1440
|
+
secondaryActions.length ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Menu.Target, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.ActionIcon, { variant: "subtle", "aria-label": "More actions", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MoreIcon, { size: "1rem" }) }) }),
|
|
1442
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Menu.Dropdown, { children: secondaryActions.map(
|
|
1443
|
+
(action) => action.href ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Menu.Item, { component: "a", href: action.href, color: action.color, children: action.label }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Menu.Item, { onClick: action.onClick, color: action.color, children: action.label }, action.label)
|
|
752
1444
|
) })
|
|
753
1445
|
] }) : null
|
|
754
1446
|
] })
|
|
755
1447
|
] }),
|
|
756
|
-
metadata.length ? /* @__PURE__ */ (0,
|
|
757
|
-
/* @__PURE__ */ (0,
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
1448
|
+
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Stack, { gap: 6, children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core21.Group, { justify: "space-between", gap: "sm", children: [
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Text, { size: "sm", c: "dimmed", children: item.label }),
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Text, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
759
1451
|
] }, item.label)) }) : null,
|
|
760
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
1452
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core21.Group, { justify: "space-between", children: primaryAction }) : null,
|
|
761
1453
|
footer
|
|
762
1454
|
] }) });
|
|
763
1455
|
}
|
|
764
1456
|
|
|
765
1457
|
// src/PublicProductCard.tsx
|
|
766
|
-
var
|
|
767
|
-
var
|
|
768
|
-
var
|
|
1458
|
+
var import_react3 = require("react");
|
|
1459
|
+
var import_core22 = require("@mantine/core");
|
|
1460
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
769
1461
|
var stateConfig = {
|
|
770
1462
|
available: { label: "Available", color: "teal" },
|
|
771
1463
|
limited: { label: "Limited", color: "yellow" },
|
|
@@ -773,38 +1465,38 @@ var stateConfig = {
|
|
|
773
1465
|
preorder: { label: "Preorder", color: "violet" }
|
|
774
1466
|
};
|
|
775
1467
|
function enhanceAction(action, disabled) {
|
|
776
|
-
if (!(0,
|
|
1468
|
+
if (!(0, import_react3.isValidElement)(action)) {
|
|
777
1469
|
return action;
|
|
778
1470
|
}
|
|
779
|
-
return (0,
|
|
1471
|
+
return (0, import_react3.cloneElement)(action, {
|
|
780
1472
|
disabled: disabled || Boolean(action.props.disabled),
|
|
781
1473
|
"aria-disabled": disabled || void 0
|
|
782
1474
|
});
|
|
783
1475
|
}
|
|
784
1476
|
function ImageFallback({ compact }) {
|
|
785
|
-
return /* @__PURE__ */ (0,
|
|
786
|
-
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.AspectRatio, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1478
|
+
import_core22.ThemeIcon,
|
|
787
1479
|
{
|
|
788
1480
|
size: "100%",
|
|
789
1481
|
radius: "md",
|
|
790
1482
|
variant: "light",
|
|
791
1483
|
color: "gray",
|
|
792
1484
|
"aria-label": "No product image available",
|
|
793
|
-
children: /* @__PURE__ */ (0,
|
|
1485
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(GdsIcons.Gallery, { size: compact ? "1.5rem" : "2rem" })
|
|
794
1486
|
}
|
|
795
1487
|
) });
|
|
796
1488
|
}
|
|
797
1489
|
function LoadingCard({ compact }) {
|
|
798
|
-
return /* @__PURE__ */ (0,
|
|
799
|
-
/* @__PURE__ */ (0,
|
|
800
|
-
/* @__PURE__ */ (0,
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
1490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: "md", children: [
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.AspectRatio, { ratio: compact ? 16 / 9 : 4 / 3, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { radius: "md" }) }),
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: "xs", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { height: 20, radius: "sm", width: "70%" }),
|
|
1494
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { height: 14, radius: "sm", width: "100%" }),
|
|
1495
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { height: 14, radius: "sm", width: "85%" })
|
|
804
1496
|
] }),
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", align: "center", children: [
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { height: 18, radius: "sm", width: 72 }),
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Skeleton, { height: 36, radius: "md", width: 120 })
|
|
808
1500
|
] })
|
|
809
1501
|
] }) });
|
|
810
1502
|
}
|
|
@@ -827,7 +1519,7 @@ function PublicProductCard({
|
|
|
827
1519
|
disabled = false
|
|
828
1520
|
}) {
|
|
829
1521
|
if (loading) {
|
|
830
|
-
return /* @__PURE__ */ (0,
|
|
1522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(LoadingCard, { compact });
|
|
831
1523
|
}
|
|
832
1524
|
const isActionDisabled = disabled || state === "sold-out";
|
|
833
1525
|
const resolvedPrimaryAction = enhanceAction(primaryAction, isActionDisabled);
|
|
@@ -840,46 +1532,211 @@ function PublicProductCard({
|
|
|
840
1532
|
const pickupHelper = helperKind === "pickup" ? helperText : pickupNote;
|
|
841
1533
|
const inventoryHelper = helperKind === "inventory" ? helperText : inventoryNote;
|
|
842
1534
|
const hasSupportingRegion = Boolean(price || supportingHelper || pickupHelper || inventoryHelper);
|
|
843
|
-
return /* @__PURE__ */ (0,
|
|
844
|
-
image ?? /* @__PURE__ */ (0,
|
|
845
|
-
/* @__PURE__ */ (0,
|
|
846
|
-
/* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
848
|
-
description ? /* @__PURE__ */ (0,
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: compact ? "sm" : "md", children: [
|
|
1536
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ImageFallback, { compact }),
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Title, { order: compact ? 5 : 4, lineClamp: 2, children: title }),
|
|
1540
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
849
1541
|
] }),
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
851
1543
|
] }),
|
|
852
|
-
hasSupportingRegion ? /* @__PURE__ */ (0,
|
|
853
|
-
/* @__PURE__ */ (0,
|
|
854
|
-
price ? /* @__PURE__ */ (0,
|
|
855
|
-
supportingHelper ? /* @__PURE__ */ (0,
|
|
1544
|
+
hasSupportingRegion ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
1546
|
+
price ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { fw: 700, size: compact ? "md" : "lg", children: price }) : null,
|
|
1547
|
+
supportingHelper ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "xs", c: "dimmed", children: supportingHelper }) : null
|
|
856
1548
|
] }),
|
|
857
1549
|
resolvedPrimaryAction
|
|
858
|
-
] }) : resolvedPrimaryAction ? /* @__PURE__ */ (0,
|
|
859
|
-
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ (0,
|
|
860
|
-
pickupHelper ? /* @__PURE__ */ (0,
|
|
861
|
-
/* @__PURE__ */ (0,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
1550
|
+
] }) : resolvedPrimaryAction ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Group, { justify: "flex-end", children: resolvedPrimaryAction }) : null,
|
|
1551
|
+
pickupHelper || inventoryHelper || metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Stack, { gap: 6, children: [
|
|
1552
|
+
pickupHelper ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", gap: "sm", children: [
|
|
1553
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
1554
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", fw: 500, ta: "right", children: pickupHelper })
|
|
863
1555
|
] }) : null,
|
|
864
|
-
inventoryHelper ? /* @__PURE__ */ (0,
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
866
|
-
/* @__PURE__ */ (0,
|
|
1556
|
+
inventoryHelper ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", gap: "sm", children: [
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", c: "dimmed", children: "Availability" }),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", fw: 500, ta: "right", children: inventoryHelper })
|
|
867
1559
|
] }) : null,
|
|
868
|
-
metadata.map((item) => /* @__PURE__ */ (0,
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
870
|
-
/* @__PURE__ */ (0,
|
|
1560
|
+
metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core22.Group, { justify: "space-between", gap: "sm", children: [
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", c: "dimmed", children: item.label }),
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Text, { size: "sm", fw: 500, ta: "right", children: item.value })
|
|
871
1563
|
] }, item.label))
|
|
872
1564
|
] }) : null,
|
|
873
|
-
resolvedSecondaryAction ? /* @__PURE__ */ (0,
|
|
1565
|
+
resolvedSecondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core22.Group, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
1566
|
+
] }) });
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
// src/PublicFoodCard.tsx
|
|
1570
|
+
var import_react4 = require("react");
|
|
1571
|
+
var import_core23 = require("@mantine/core");
|
|
1572
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1573
|
+
var ratioMap2 = {
|
|
1574
|
+
square: 1,
|
|
1575
|
+
dish: 4 / 3,
|
|
1576
|
+
landscape: 16 / 9
|
|
1577
|
+
};
|
|
1578
|
+
var stateConfig2 = {
|
|
1579
|
+
available: { label: "Available", color: "teal" },
|
|
1580
|
+
preorder: { label: "Preorder", color: "violet" },
|
|
1581
|
+
limited: { label: "Limited batch", color: "yellow" },
|
|
1582
|
+
"sold-out": { label: "Sold out", color: "red" },
|
|
1583
|
+
"coming-soon": { label: "Coming soon", color: "gray" }
|
|
1584
|
+
};
|
|
1585
|
+
var markerToneMap = {
|
|
1586
|
+
default: "gray",
|
|
1587
|
+
positive: "teal",
|
|
1588
|
+
warning: "orange",
|
|
1589
|
+
muted: "dark"
|
|
1590
|
+
};
|
|
1591
|
+
function enhanceAction2(action, disabled) {
|
|
1592
|
+
if (!(0, import_react4.isValidElement)(action)) {
|
|
1593
|
+
return action;
|
|
1594
|
+
}
|
|
1595
|
+
return (0, import_react4.cloneElement)(action, {
|
|
1596
|
+
disabled: disabled || Boolean(action.props.disabled),
|
|
1597
|
+
"aria-disabled": disabled || void 0
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
function FoodImageFallback({ mediaRatio }) {
|
|
1601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.AspectRatio, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.ThemeIcon, { size: "100%", radius: "md", variant: "light", color: "gray", "aria-label": "No food image available", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GdsIcons.Gallery, { size: "2rem" }) }) });
|
|
1602
|
+
}
|
|
1603
|
+
function LoadingFoodCard({ mediaRatio }) {
|
|
1604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: "md", children: [
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.AspectRatio, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { radius: "md" }) }),
|
|
1606
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: "xs", children: [
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { height: 20, radius: "sm", width: "72%" }),
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { height: 14, radius: "sm", width: "96%" }),
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { height: 14, radius: "sm", width: "78%" })
|
|
1610
|
+
] }),
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "center", children: [
|
|
1612
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { height: 18, radius: "sm", width: 96 }),
|
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Skeleton, { height: 36, radius: "md", width: 112 })
|
|
1614
|
+
] })
|
|
1615
|
+
] }) });
|
|
1616
|
+
}
|
|
1617
|
+
function PublicFoodCard({
|
|
1618
|
+
title,
|
|
1619
|
+
description,
|
|
1620
|
+
image,
|
|
1621
|
+
price,
|
|
1622
|
+
priceNote,
|
|
1623
|
+
state,
|
|
1624
|
+
helperText,
|
|
1625
|
+
pickupNote,
|
|
1626
|
+
freshnessNote,
|
|
1627
|
+
markers = [],
|
|
1628
|
+
metadata = [],
|
|
1629
|
+
primaryAction,
|
|
1630
|
+
secondaryAction,
|
|
1631
|
+
quantityHint,
|
|
1632
|
+
mediaRatio = "dish",
|
|
1633
|
+
loading = false,
|
|
1634
|
+
disabled = false
|
|
1635
|
+
}) {
|
|
1636
|
+
if (loading) {
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(LoadingFoodCard, { mediaRatio });
|
|
1638
|
+
}
|
|
1639
|
+
const stateBadge = stateConfig2[state];
|
|
1640
|
+
const isActionDisabled = disabled || state === "sold-out" || state === "coming-soon";
|
|
1641
|
+
const resolvedPrimaryAction = enhanceAction2(primaryAction, isActionDisabled);
|
|
1642
|
+
const resolvedSecondaryAction = enhanceAction2(secondaryAction, disabled);
|
|
1643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: "md", children: [
|
|
1644
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FoodImageFallback, { mediaRatio }),
|
|
1645
|
+
markers.length > 0 || quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "center", wrap: "wrap", gap: "xs", children: [
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Group, { gap: "xs", wrap: "wrap", children: markers.map((marker) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Badge, { variant: "light", color: markerToneMap[marker.tone ?? "default"], children: marker.label }, marker.id)) }),
|
|
1647
|
+
quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "xs", fw: 600, c: "dimmed", children: quantityHint }) : null
|
|
1648
|
+
] }) : null,
|
|
1649
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Title, { order: 4, lineClamp: 2, children: title }),
|
|
1652
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
1653
|
+
] }),
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
1655
|
+
] }),
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
1658
|
+
price ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { fw: 800, size: "lg", children: price }) : null,
|
|
1659
|
+
priceNote ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "xs", c: "dimmed", children: priceNote }) : null,
|
|
1660
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
1661
|
+
] }),
|
|
1662
|
+
resolvedPrimaryAction
|
|
1663
|
+
] }),
|
|
1664
|
+
pickupNote || freshnessNote || metadata.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Stack, { gap: 6, children: [
|
|
1665
|
+
pickupNote ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1666
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", fw: 500, ta: "right", children: pickupNote })
|
|
1668
|
+
] }) : null,
|
|
1669
|
+
freshnessNote ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", c: "dimmed", children: "Freshness" }),
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", fw: 500, ta: "right", children: freshnessNote })
|
|
1672
|
+
] }) : null,
|
|
1673
|
+
metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core23.Group, { gap: "xs", wrap: "nowrap", children: [
|
|
1674
|
+
item.icon,
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
1676
|
+
] }) }, item.id))
|
|
1677
|
+
] }) : null,
|
|
1678
|
+
resolvedSecondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core23.Group, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
1679
|
+
] }) });
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
// src/FoodMenuSection.tsx
|
|
1683
|
+
var import_core24 = require("@mantine/core");
|
|
1684
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1685
|
+
function FoodMenuSection({
|
|
1686
|
+
title,
|
|
1687
|
+
description,
|
|
1688
|
+
eyebrow,
|
|
1689
|
+
categories,
|
|
1690
|
+
sectionNote,
|
|
1691
|
+
action,
|
|
1692
|
+
emptyState,
|
|
1693
|
+
columns = 3,
|
|
1694
|
+
showEmptyCategories = false
|
|
1695
|
+
}) {
|
|
1696
|
+
const normalizedCategories = (categories ?? []).filter(Boolean);
|
|
1697
|
+
const visibleCategories = showEmptyCategories ? normalizedCategories : normalizedCategories.filter((category) => category.items.length > 0);
|
|
1698
|
+
if (!visibleCategories.length) {
|
|
1699
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1700
|
+
EmptyState,
|
|
1701
|
+
{
|
|
1702
|
+
title: "No active menu available",
|
|
1703
|
+
description: "Publish grouped menu categories here when the current weekly or seasonal menu is ready."
|
|
1704
|
+
}
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Box, { component: "section", "aria-label": typeof title === "string" ? title : "Food menu section", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core24.Stack, { gap: "xl", children: [
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core24.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core24.Stack, { gap: 4, children: [
|
|
1710
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Title, { order: 2, children: title }),
|
|
1712
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Text, { size: "sm", c: "dimmed", maw: 760, children: description }) : null,
|
|
1713
|
+
sectionNote ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Text, { size: "sm", c: "dimmed", children: sectionNote }) : null
|
|
1714
|
+
] }),
|
|
1715
|
+
action
|
|
1716
|
+
] }),
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Stack, { gap: "xl", children: visibleCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core24.Stack, { gap: "md", children: [
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core24.Stack, { gap: 4, children: [
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Title, { order: 3, children: category.title }),
|
|
1720
|
+
category.description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Text, { size: "sm", c: "dimmed", children: category.description }) : null,
|
|
1721
|
+
category.helperNote ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.Text, { size: "sm", c: "dimmed", children: category.helperNote }) : null
|
|
1722
|
+
] }),
|
|
1723
|
+
category.items.length ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core24.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: category.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PublicFoodCard, { ...item }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1724
|
+
EmptyState,
|
|
1725
|
+
{
|
|
1726
|
+
title: "No items in this category",
|
|
1727
|
+
description: "This category is defined, but it does not currently have any visible dishes or bundles."
|
|
1728
|
+
}
|
|
1729
|
+
)
|
|
1730
|
+
] }, category.id)) })
|
|
874
1731
|
] }) });
|
|
875
1732
|
}
|
|
876
1733
|
|
|
877
1734
|
// src/BrowseSurface.tsx
|
|
878
|
-
var
|
|
1735
|
+
var import_core26 = require("@mantine/core");
|
|
879
1736
|
|
|
880
1737
|
// src/DataToolbar.tsx
|
|
881
|
-
var
|
|
882
|
-
var
|
|
1738
|
+
var import_core25 = require("@mantine/core");
|
|
1739
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
883
1740
|
function DataToolbar({
|
|
884
1741
|
searchSlot,
|
|
885
1742
|
filterSlot,
|
|
@@ -888,20 +1745,20 @@ function DataToolbar({
|
|
|
888
1745
|
createAction,
|
|
889
1746
|
activeFilters = []
|
|
890
1747
|
}) {
|
|
891
|
-
return /* @__PURE__ */ (0,
|
|
892
|
-
/* @__PURE__ */ (0,
|
|
893
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core25.Stack, { gap: "sm", children: [
|
|
1749
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core25.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1750
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core25.Group, { flex: 1, align: "flex-start", gap: "sm", children: [
|
|
894
1751
|
searchSlot,
|
|
895
1752
|
filterSlot,
|
|
896
1753
|
sortSlot
|
|
897
1754
|
] }),
|
|
898
|
-
/* @__PURE__ */ (0,
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core25.Group, { gap: "sm", children: [
|
|
899
1756
|
resetAction,
|
|
900
1757
|
createAction
|
|
901
1758
|
] })
|
|
902
1759
|
] }),
|
|
903
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
904
|
-
|
|
1760
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_core25.Group, { gap: "xs", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1761
|
+
import_core25.Badge,
|
|
905
1762
|
{
|
|
906
1763
|
variant: "light",
|
|
907
1764
|
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
@@ -914,50 +1771,8 @@ function DataToolbar({
|
|
|
914
1771
|
] });
|
|
915
1772
|
}
|
|
916
1773
|
|
|
917
|
-
// src/StateBlock.tsx
|
|
918
|
-
var import_core16 = require("@mantine/core");
|
|
919
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
920
|
-
var variantConfig = {
|
|
921
|
-
loading: { color: "violet", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Loader, { size: "sm" }) },
|
|
922
|
-
empty: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
923
|
-
error: { color: "red", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
924
|
-
permission: { color: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
925
|
-
disabled: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
926
|
-
success: { color: "teal", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Success, { size: "1.1rem" }) },
|
|
927
|
-
info: { color: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Info, { size: "1.1rem" }) },
|
|
928
|
-
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
929
|
-
};
|
|
930
|
-
function StateBlock({
|
|
931
|
-
variant,
|
|
932
|
-
title,
|
|
933
|
-
description,
|
|
934
|
-
action,
|
|
935
|
-
icon,
|
|
936
|
-
compact = false
|
|
937
|
-
}) {
|
|
938
|
-
const config = variantConfig[variant];
|
|
939
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
940
|
-
import_core16.Stack,
|
|
941
|
-
{
|
|
942
|
-
align: compact ? "flex-start" : "center",
|
|
943
|
-
justify: "center",
|
|
944
|
-
gap: "md",
|
|
945
|
-
py: compact ? "md" : "xl",
|
|
946
|
-
ta: compact ? "left" : "center",
|
|
947
|
-
children: [
|
|
948
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.ThemeIcon, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
949
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
950
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Title, { order: compact ? 4 : 3, children: title }),
|
|
951
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
952
|
-
] }),
|
|
953
|
-
action
|
|
954
|
-
]
|
|
955
|
-
}
|
|
956
|
-
);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
1774
|
// src/BrowseSurface.tsx
|
|
960
|
-
var
|
|
1775
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
961
1776
|
function BrowseSurface({
|
|
962
1777
|
eyebrow,
|
|
963
1778
|
title,
|
|
@@ -991,22 +1806,22 @@ function BrowseSurface({
|
|
|
991
1806
|
}));
|
|
992
1807
|
let body = content;
|
|
993
1808
|
if (loading) {
|
|
994
|
-
body = /* @__PURE__ */ (0,
|
|
1809
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StateBlock, { variant: "loading", title: loadingTitle, description: loadingDescription, compact: true });
|
|
995
1810
|
} else if (error) {
|
|
996
|
-
body = /* @__PURE__ */ (0,
|
|
1811
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StateBlock, { variant: "error", title: errorTitle, description: error, action: errorAction ?? emptyAction, compact: true });
|
|
997
1812
|
} else if (empty) {
|
|
998
|
-
body = /* @__PURE__ */ (0,
|
|
1813
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, action: emptyAction, compact: true });
|
|
999
1814
|
}
|
|
1000
|
-
return /* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1003
|
-
/* @__PURE__ */ (0,
|
|
1004
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1005
|
-
/* @__PURE__ */ (0,
|
|
1006
|
-
description ? /* @__PURE__ */ (0,
|
|
1815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "lg", children: [
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Paper, { withBorder: true, radius: "xl", p: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "lg", children: [
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Group, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
1818
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "xs", maw: 760, children: [
|
|
1819
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "xs", fw: 700, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.18em" }, children: eyebrow }) : null,
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Title, { order: 1, children: title }),
|
|
1821
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "lg", c: "dimmed", children: description }) : null
|
|
1007
1822
|
] }),
|
|
1008
|
-
/* @__PURE__ */ (0,
|
|
1009
|
-
typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
1823
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { align: "flex-end", gap: "xs", children: [
|
|
1824
|
+
typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Badge, { size: "lg", radius: "xl", variant: "light", color: "violet", children: [
|
|
1010
1825
|
resultCount,
|
|
1011
1826
|
" ",
|
|
1012
1827
|
resultLabel
|
|
@@ -1014,10 +1829,10 @@ function BrowseSurface({
|
|
|
1014
1829
|
primaryControls
|
|
1015
1830
|
] })
|
|
1016
1831
|
] }),
|
|
1017
|
-
scopeOptions.length ? /* @__PURE__ */ (0,
|
|
1018
|
-
/* @__PURE__ */ (0,
|
|
1019
|
-
/* @__PURE__ */ (0,
|
|
1020
|
-
|
|
1832
|
+
scopeOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "xs", children: [
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "sm", fw: 600, c: "dimmed", children: scopeLabel }),
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Group, { gap: "xs", wrap: "wrap", children: scopeOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1835
|
+
import_core26.Button,
|
|
1021
1836
|
{
|
|
1022
1837
|
variant: option.active ? "filled" : "default",
|
|
1023
1838
|
color: option.active ? "violet" : "gray",
|
|
@@ -1029,30 +1844,30 @@ function BrowseSurface({
|
|
|
1029
1844
|
option.id
|
|
1030
1845
|
)) })
|
|
1031
1846
|
] }) : null,
|
|
1032
|
-
locationControls ? /* @__PURE__ */ (0,
|
|
1033
|
-
/* @__PURE__ */ (0,
|
|
1847
|
+
locationControls ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "xs", children: [
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "sm", fw: 600, c: "dimmed", children: "Location" }),
|
|
1034
1849
|
locationControls
|
|
1035
1850
|
] }) : null,
|
|
1036
|
-
toolbar || sortControl ? /* @__PURE__ */ (0,
|
|
1037
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
1851
|
+
toolbar || sortControl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.SimpleGrid, { cols: { base: 1, lg: sortControl ? 2 : 1 }, spacing: "md", children: [
|
|
1852
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1038
1853
|
DataToolbar,
|
|
1039
1854
|
{
|
|
1040
1855
|
...toolbar,
|
|
1041
1856
|
activeFilters: toolbarFilters.length ? toolbarFilters : toolbar.fallbackActiveFilters
|
|
1042
1857
|
}
|
|
1043
|
-
) : /* @__PURE__ */ (0,
|
|
1044
|
-
sortControl ? /* @__PURE__ */ (0,
|
|
1045
|
-
/* @__PURE__ */ (0,
|
|
1858
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Box, {}),
|
|
1859
|
+
sortControl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { gap: "xs", align: "stretch", children: [
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "sm", fw: 600, c: "dimmed", children: "Sort" }),
|
|
1046
1861
|
sortControl
|
|
1047
1862
|
] }) : null
|
|
1048
1863
|
] }) : null,
|
|
1049
|
-
mobileFilters ? /* @__PURE__ */ (0,
|
|
1050
|
-
/* @__PURE__ */ (0,
|
|
1864
|
+
mobileFilters ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core26.Stack, { hiddenFrom: "lg", gap: "xs", children: [
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Text, { size: "sm", fw: 600, c: "dimmed", children: "Filters" }),
|
|
1051
1866
|
mobileFilters
|
|
1052
1867
|
] }) : null,
|
|
1053
|
-
filterDrawer ? /* @__PURE__ */ (0,
|
|
1054
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
1055
|
-
|
|
1868
|
+
filterDrawer ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Box, { hiddenFrom: "lg", children: filterDrawer }) : null,
|
|
1869
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core26.Group, { gap: "xs", wrap: "wrap", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1870
|
+
import_core26.Badge,
|
|
1056
1871
|
{
|
|
1057
1872
|
variant: "light",
|
|
1058
1873
|
color: "violet",
|
|
@@ -1063,92 +1878,52 @@ function BrowseSurface({
|
|
|
1063
1878
|
},
|
|
1064
1879
|
filter.id
|
|
1065
1880
|
)) }) : null
|
|
1066
|
-
] }) }),
|
|
1067
|
-
body
|
|
1068
|
-
] });
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
// src/AccentPanel.tsx
|
|
1072
|
-
var import_core18 = require("@mantine/core");
|
|
1073
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1074
|
-
var toneStyles = {
|
|
1075
|
-
gray: {
|
|
1076
|
-
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
1077
|
-
border: "light-dark(var(--mantine-color-gray-2), color-mix(in srgb, var(--mantine-color-gray-4) 70%, transparent))",
|
|
1078
|
-
color: "light-dark(var(--mantine-color-gray-9), var(--mantine-color-gray-0))"
|
|
1079
|
-
},
|
|
1080
|
-
violet: {
|
|
1081
|
-
bg: "light-dark(var(--mantine-color-violet-0), color-mix(in srgb, var(--mantine-color-violet-9) 70%, black))",
|
|
1082
|
-
border: "light-dark(var(--mantine-color-violet-2), color-mix(in srgb, var(--mantine-color-violet-4) 75%, transparent))",
|
|
1083
|
-
color: "light-dark(var(--mantine-color-violet-9), var(--mantine-color-violet-0))"
|
|
1084
|
-
},
|
|
1085
|
-
green: {
|
|
1086
|
-
bg: "light-dark(var(--mantine-color-green-0), color-mix(in srgb, var(--mantine-color-green-9) 72%, black))",
|
|
1087
|
-
border: "light-dark(var(--mantine-color-green-2), color-mix(in srgb, var(--mantine-color-green-4) 78%, transparent))",
|
|
1088
|
-
color: "light-dark(var(--mantine-color-green-9), var(--mantine-color-green-0))"
|
|
1089
|
-
},
|
|
1090
|
-
red: {
|
|
1091
|
-
bg: "light-dark(var(--mantine-color-red-0), color-mix(in srgb, var(--mantine-color-red-9) 72%, black))",
|
|
1092
|
-
border: "light-dark(var(--mantine-color-red-2), color-mix(in srgb, var(--mantine-color-red-4) 78%, transparent))",
|
|
1093
|
-
color: "light-dark(var(--mantine-color-red-9), var(--mantine-color-red-0))"
|
|
1094
|
-
},
|
|
1095
|
-
amber: {
|
|
1096
|
-
bg: "light-dark(var(--mantine-color-yellow-0), color-mix(in srgb, var(--mantine-color-yellow-8) 78%, black))",
|
|
1097
|
-
border: "light-dark(var(--mantine-color-yellow-3), color-mix(in srgb, var(--mantine-color-yellow-5) 70%, transparent))",
|
|
1098
|
-
color: "light-dark(var(--mantine-color-yellow-9), var(--mantine-color-yellow-0))"
|
|
1099
|
-
},
|
|
1100
|
-
blue: {
|
|
1101
|
-
bg: "light-dark(var(--mantine-color-blue-0), color-mix(in srgb, var(--mantine-color-blue-9) 74%, black))",
|
|
1102
|
-
border: "light-dark(var(--mantine-color-blue-2), color-mix(in srgb, var(--mantine-color-blue-4) 75%, transparent))",
|
|
1103
|
-
color: "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-0))"
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
function resolveAccentPanelStyles(tone = "violet", variant = "subtle") {
|
|
1107
|
-
const token = toneStyles[tone];
|
|
1108
|
-
if (variant === "soft-outline") {
|
|
1109
|
-
return {
|
|
1110
|
-
backgroundColor: "light-dark(var(--mantine-color-body), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))",
|
|
1111
|
-
border: `1px solid ${token.border}`,
|
|
1112
|
-
color: token.color
|
|
1113
|
-
};
|
|
1114
|
-
}
|
|
1115
|
-
return {
|
|
1116
|
-
backgroundColor: token.bg,
|
|
1117
|
-
border: `1px solid ${token.border}`,
|
|
1118
|
-
color: token.color
|
|
1119
|
-
};
|
|
1881
|
+
] }) }),
|
|
1882
|
+
body
|
|
1883
|
+
] });
|
|
1120
1884
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1885
|
+
|
|
1886
|
+
// src/DetailProfileShell.tsx
|
|
1887
|
+
var import_core27 = require("@mantine/core");
|
|
1888
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1889
|
+
function DetailProfileShell({
|
|
1890
|
+
mode = "page",
|
|
1891
|
+
hero,
|
|
1892
|
+
actions,
|
|
1893
|
+
sections,
|
|
1894
|
+
related,
|
|
1895
|
+
padding = "lg",
|
|
1896
|
+
showDividers = true
|
|
1127
1897
|
}) {
|
|
1128
|
-
const
|
|
1129
|
-
return /* @__PURE__ */ (0,
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1898
|
+
const content = sections.filter(Boolean);
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core27.Paper, { withBorder: mode === "drawer", radius: mode === "drawer" ? "xl" : "md", p: padding, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core27.Stack, { gap: "lg", children: [
|
|
1900
|
+
hero,
|
|
1901
|
+
actions,
|
|
1902
|
+
content.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core27.Stack, { gap: "lg", children: [
|
|
1903
|
+
index > 0 && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core27.Divider, {}) : null,
|
|
1904
|
+
section
|
|
1905
|
+
] }, index)),
|
|
1906
|
+
related ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
1907
|
+
content.length && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core27.Divider, {}) : null,
|
|
1908
|
+
related
|
|
1909
|
+
] }) : null
|
|
1135
1910
|
] }) });
|
|
1136
1911
|
}
|
|
1137
1912
|
|
|
1138
1913
|
// src/PublicShell.tsx
|
|
1139
|
-
var
|
|
1914
|
+
var import_core29 = require("@mantine/core");
|
|
1140
1915
|
|
|
1141
1916
|
// src/PublicNav.tsx
|
|
1142
|
-
var
|
|
1143
|
-
var
|
|
1917
|
+
var import_core28 = require("@mantine/core");
|
|
1918
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1144
1919
|
function PublicNav({ items, activeId, renderLink }) {
|
|
1145
|
-
return /* @__PURE__ */ (0,
|
|
1920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core28.Group, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
1146
1921
|
const active = item.id === activeId;
|
|
1147
1922
|
if (renderLink) {
|
|
1148
|
-
return /* @__PURE__ */ (0,
|
|
1923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: renderLink(item, active) }, item.id);
|
|
1149
1924
|
}
|
|
1150
|
-
return /* @__PURE__ */ (0,
|
|
1151
|
-
|
|
1925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1926
|
+
import_core28.Anchor,
|
|
1152
1927
|
{
|
|
1153
1928
|
href: item.href,
|
|
1154
1929
|
"aria-current": active ? "page" : void 0,
|
|
@@ -1165,15 +1940,15 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
1165
1940
|
}
|
|
1166
1941
|
|
|
1167
1942
|
// src/PublicShell.tsx
|
|
1168
|
-
var
|
|
1943
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1169
1944
|
function InlineMobileNavigation({
|
|
1170
1945
|
mobileNavigation,
|
|
1171
1946
|
className,
|
|
1172
1947
|
mode
|
|
1173
1948
|
}) {
|
|
1174
|
-
return /* @__PURE__ */ (0,
|
|
1175
|
-
/* @__PURE__ */ (0,
|
|
1176
|
-
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core29.Box, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1950
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1951
|
+
import_core29.Box,
|
|
1177
1952
|
{
|
|
1178
1953
|
component: "summary",
|
|
1179
1954
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -1185,13 +1960,13 @@ function InlineMobileNavigation({
|
|
|
1185
1960
|
gap: "0.5rem"
|
|
1186
1961
|
},
|
|
1187
1962
|
children: [
|
|
1188
|
-
/* @__PURE__ */ (0,
|
|
1189
|
-
/* @__PURE__ */ (0,
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Burger, { opened: false, "aria-hidden": true }),
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Text, { size: "sm", fw: 600, children: "Menu" })
|
|
1190
1965
|
]
|
|
1191
1966
|
}
|
|
1192
1967
|
),
|
|
1193
|
-
/* @__PURE__ */ (0,
|
|
1194
|
-
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1969
|
+
import_core29.Box,
|
|
1195
1970
|
{
|
|
1196
1971
|
mt: "sm",
|
|
1197
1972
|
p: "sm",
|
|
@@ -1200,7 +1975,7 @@ function InlineMobileNavigation({
|
|
|
1200
1975
|
border: "1px solid var(--mantine-color-default-border)",
|
|
1201
1976
|
background: mode === "drawer" ? "light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))" : "var(--mantine-color-body)"
|
|
1202
1977
|
},
|
|
1203
|
-
children: /* @__PURE__ */ (0,
|
|
1978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Stack, { gap: "sm", children: mobileNavigation })
|
|
1204
1979
|
}
|
|
1205
1980
|
)
|
|
1206
1981
|
] });
|
|
@@ -1221,30 +1996,30 @@ function PublicShell({
|
|
|
1221
1996
|
mobileNavigationMode = "sheet",
|
|
1222
1997
|
classNames
|
|
1223
1998
|
}) {
|
|
1224
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0,
|
|
1999
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1225
2000
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1226
2001
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1227
2002
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1228
2003
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1229
2004
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1230
|
-
return /* @__PURE__ */ (0,
|
|
1231
|
-
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2006
|
+
import_core29.AppShell,
|
|
1232
2007
|
{
|
|
1233
2008
|
className: classNames?.root,
|
|
1234
2009
|
header: { height: headerHeight },
|
|
1235
2010
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1236
2011
|
padding: 0,
|
|
1237
2012
|
children: [
|
|
1238
|
-
/* @__PURE__ */ (0,
|
|
1239
|
-
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2014
|
+
import_core29.Group,
|
|
1240
2015
|
{
|
|
1241
2016
|
h: "100%",
|
|
1242
2017
|
justify: "space-between",
|
|
1243
2018
|
wrap: "nowrap",
|
|
1244
2019
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1245
2020
|
children: [
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
1247
|
-
usesInlineMobileNavigation ? /* @__PURE__ */ (0,
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core29.Group, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
2022
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1248
2023
|
InlineMobileNavigation,
|
|
1249
2024
|
{
|
|
1250
2025
|
mobileNavigation,
|
|
@@ -1252,36 +2027,144 @@ function PublicShell({
|
|
|
1252
2027
|
mode: mobileNavigationMode
|
|
1253
2028
|
}
|
|
1254
2029
|
) : null,
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
2030
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Box, { children: brand })
|
|
1256
2031
|
] }),
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
2032
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Group, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Group, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1259
2034
|
]
|
|
1260
2035
|
}
|
|
1261
2036
|
) }) }),
|
|
1262
|
-
usesSheetMobileNavigation ? /* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
footer ? /* @__PURE__ */ (0,
|
|
2037
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Group, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core29.AppShell.Main, { children: [
|
|
2039
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Stack, { gap: "xl", children }) }),
|
|
2040
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Box, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core29.Text, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1266
2041
|
] })
|
|
1267
2042
|
]
|
|
1268
2043
|
}
|
|
1269
2044
|
);
|
|
1270
2045
|
}
|
|
1271
2046
|
|
|
2047
|
+
// src/DiscoveryShell.tsx
|
|
2048
|
+
var import_core30 = require("@mantine/core");
|
|
2049
|
+
var import_hooks2 = require("@mantine/hooks");
|
|
2050
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2051
|
+
function DiscoveryShell({
|
|
2052
|
+
header,
|
|
2053
|
+
sidebar,
|
|
2054
|
+
footer,
|
|
2055
|
+
children,
|
|
2056
|
+
mobileNavigationLabel = "Toggle navigation",
|
|
2057
|
+
defaultSidebarOpen = false,
|
|
2058
|
+
stickySidebar = true,
|
|
2059
|
+
sidebarWidth = 280,
|
|
2060
|
+
headerHeight = 60,
|
|
2061
|
+
shellPadding = "md",
|
|
2062
|
+
collapseBreakpoint = "sm"
|
|
2063
|
+
}) {
|
|
2064
|
+
const [opened, { toggle, close }] = (0, import_hooks2.useDisclosure)(defaultSidebarOpen);
|
|
2065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2066
|
+
import_core30.AppShell,
|
|
2067
|
+
{
|
|
2068
|
+
header: { height: headerHeight },
|
|
2069
|
+
footer: footer ? { height: 68 } : void 0,
|
|
2070
|
+
navbar: {
|
|
2071
|
+
width: sidebarWidth,
|
|
2072
|
+
breakpoint: collapseBreakpoint,
|
|
2073
|
+
collapsed: { mobile: !opened }
|
|
2074
|
+
},
|
|
2075
|
+
padding: shellPadding,
|
|
2076
|
+
children: [
|
|
2077
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.AppShell.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core30.Group, { h: "100%", px: "md", gap: "sm", wrap: "nowrap", children: [
|
|
2078
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2079
|
+
import_core30.Burger,
|
|
2080
|
+
{
|
|
2081
|
+
opened,
|
|
2082
|
+
onClick: toggle,
|
|
2083
|
+
hiddenFrom: collapseBreakpoint,
|
|
2084
|
+
size: "sm",
|
|
2085
|
+
"aria-label": mobileNavigationLabel
|
|
2086
|
+
}
|
|
2087
|
+
),
|
|
2088
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.Box, { style: { flex: 1, minWidth: 0 }, children: header })
|
|
2089
|
+
] }) }),
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.AppShell.Navbar, { p: "md", "data-sticky-sidebar": stickySidebar || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.ScrollArea, { h: "100%", type: "auto", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2091
|
+
import_core30.Box,
|
|
2092
|
+
{
|
|
2093
|
+
h: "100%",
|
|
2094
|
+
style: stickySidebar ? {
|
|
2095
|
+
display: "flex",
|
|
2096
|
+
flexDirection: "column"
|
|
2097
|
+
} : void 0,
|
|
2098
|
+
children: sidebar
|
|
2099
|
+
}
|
|
2100
|
+
) }) }),
|
|
2101
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.AppShell.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.Group, { h: "100%", px: "md", justify: "space-around", wrap: "nowrap", children: footer }) }) : null,
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core30.AppShell.Main, { onClick: () => close(), children })
|
|
2103
|
+
]
|
|
2104
|
+
}
|
|
2105
|
+
);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
// src/SidebarNav.tsx
|
|
2109
|
+
var import_react5 = require("react");
|
|
2110
|
+
var import_core31 = require("@mantine/core");
|
|
2111
|
+
var import_gds_theme4 = require("@doneisbetter/gds-theme");
|
|
2112
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2113
|
+
function SidebarNav({ children, ariaLabel = "Primary navigation", gap = "md" }) {
|
|
2114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core31.Stack, { component: "nav", "aria-label": ariaLabel, gap, h: "100%", children });
|
|
2115
|
+
}
|
|
2116
|
+
function SidebarNavSection({ label, children, pushToBottom = false }) {
|
|
2117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core31.Stack, { gap: "xs", mt: pushToBottom ? "auto" : void 0, children: [
|
|
2118
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core31.Text, { size: "xs", fw: 700, c: "dimmed", children: label }) : null,
|
|
2119
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core31.Stack, { gap: 4, children })
|
|
2120
|
+
] });
|
|
2121
|
+
}
|
|
2122
|
+
var _SidebarNavItem = (0, import_react5.forwardRef)(
|
|
2123
|
+
({
|
|
2124
|
+
action,
|
|
2125
|
+
label,
|
|
2126
|
+
description,
|
|
2127
|
+
badge,
|
|
2128
|
+
icon,
|
|
2129
|
+
"aria-label": ariaLabel,
|
|
2130
|
+
"aria-current": ariaCurrent,
|
|
2131
|
+
vocabularyPacks = [],
|
|
2132
|
+
...props
|
|
2133
|
+
}, ref) => {
|
|
2134
|
+
const { t } = (0, import_gds_theme4.useGdsTranslation)();
|
|
2135
|
+
const config = action ? resolveSemanticActionConfig(action, vocabularyPacks) : null;
|
|
2136
|
+
const Icon = config?.icon;
|
|
2137
|
+
const resolvedLabel = label ?? (action ? getSemanticActionLabel(action, t, vocabularyPacks) : void 0);
|
|
2138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2139
|
+
import_core31.NavLink,
|
|
2140
|
+
{
|
|
2141
|
+
ref,
|
|
2142
|
+
label: resolvedLabel,
|
|
2143
|
+
description,
|
|
2144
|
+
leftSection: icon ?? (Icon ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { size: "1rem", stroke: 1.5 }) : void 0),
|
|
2145
|
+
rightSection: badge ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core31.Box, { children: badge }) : props.rightSection,
|
|
2146
|
+
"aria-label": ariaLabel ?? (typeof resolvedLabel === "string" ? resolvedLabel : void 0),
|
|
2147
|
+
"aria-current": props.active ? "page" : ariaCurrent,
|
|
2148
|
+
...props
|
|
2149
|
+
}
|
|
2150
|
+
);
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
var SidebarNavItem = (0, import_core31.createPolymorphicComponent)(_SidebarNavItem);
|
|
2154
|
+
|
|
1272
2155
|
// src/PublicSiteFooter.tsx
|
|
1273
|
-
var
|
|
1274
|
-
var
|
|
2156
|
+
var import_core32 = require("@mantine/core");
|
|
2157
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1275
2158
|
function PublicSiteFooter({ children, meta }) {
|
|
1276
|
-
return /* @__PURE__ */ (0,
|
|
1277
|
-
children ? /* @__PURE__ */ (0,
|
|
1278
|
-
meta ? /* @__PURE__ */ (0,
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core32.Stack, { component: "footer", gap: "xs", children: [
|
|
2160
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core32.Text, { size: "sm", children }) : null,
|
|
2161
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core32.Group, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core32.Text, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1279
2162
|
] });
|
|
1280
2163
|
}
|
|
1281
2164
|
|
|
1282
2165
|
// src/PublicBrandFooter.tsx
|
|
1283
|
-
var
|
|
1284
|
-
var
|
|
2166
|
+
var import_core33 = require("@mantine/core");
|
|
2167
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1285
2168
|
function PublicBrandFooter({
|
|
1286
2169
|
media,
|
|
1287
2170
|
brandTitle,
|
|
@@ -1296,8 +2179,8 @@ function PublicBrandFooter({
|
|
|
1296
2179
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1297
2180
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1298
2181
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1299
|
-
return /* @__PURE__ */ (0,
|
|
1300
|
-
|
|
2182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2183
|
+
import_core33.Paper,
|
|
1301
2184
|
{
|
|
1302
2185
|
component: "footer",
|
|
1303
2186
|
withBorder: true,
|
|
@@ -1305,19 +2188,19 @@ function PublicBrandFooter({
|
|
|
1305
2188
|
p: compact ? "lg" : "xl",
|
|
1306
2189
|
className: classNames?.root,
|
|
1307
2190
|
"data-layout-variant": layoutVariant,
|
|
1308
|
-
children: /* @__PURE__ */ (0,
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1310
|
-
media ? /* @__PURE__ */ (0,
|
|
1311
|
-
/* @__PURE__ */ (0,
|
|
1312
|
-
brandTitle ? /* @__PURE__ */ (0,
|
|
1313
|
-
description ? /* @__PURE__ */ (0,
|
|
1314
|
-
actions ? /* @__PURE__ */ (0,
|
|
2191
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core33.Stack, { gap: "lg", children: [
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core33.Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
2193
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Box, { className: classNames?.media, children: media }) }) : null,
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core33.Stack, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
2195
|
+
brandTitle ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Title, { order: 4, children: brandTitle }) : null,
|
|
2196
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Text, { c: "dimmed", children: description }) : null,
|
|
2197
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Box, { children: actions }) : null
|
|
1315
2198
|
] }) }),
|
|
1316
|
-
secondary ? /* @__PURE__ */ (0,
|
|
2199
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Stack, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1317
2200
|
] }),
|
|
1318
|
-
legal ? /* @__PURE__ */ (0,
|
|
1319
|
-
/* @__PURE__ */ (0,
|
|
1320
|
-
/* @__PURE__ */ (0,
|
|
2201
|
+
legal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
2202
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Divider, {}),
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Group, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core33.Text, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1321
2204
|
] }) : null
|
|
1322
2205
|
] })
|
|
1323
2206
|
}
|
|
@@ -1325,50 +2208,126 @@ function PublicBrandFooter({
|
|
|
1325
2208
|
}
|
|
1326
2209
|
|
|
1327
2210
|
// src/AuthShell.tsx
|
|
1328
|
-
var
|
|
1329
|
-
var
|
|
1330
|
-
function AuthShell({
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
2211
|
+
var import_core34 = require("@mantine/core");
|
|
2212
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2213
|
+
function AuthShell({
|
|
2214
|
+
title,
|
|
2215
|
+
description,
|
|
2216
|
+
brand,
|
|
2217
|
+
headerActions,
|
|
2218
|
+
footer,
|
|
2219
|
+
helper,
|
|
2220
|
+
socialAuth,
|
|
2221
|
+
dividerLabel = "Or continue with your account",
|
|
2222
|
+
children
|
|
2223
|
+
}) {
|
|
2224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Box, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Container, { size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core34.Stack, { gap: "xl", children: [
|
|
2225
|
+
brand || headerActions ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core34.Group, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
2226
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Box, { children: brand }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Box, {}),
|
|
2227
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Group, { gap: "sm", children: headerActions }) : null
|
|
1335
2228
|
] }) : null,
|
|
1336
|
-
/* @__PURE__ */ (0,
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1338
|
-
/* @__PURE__ */ (0,
|
|
1339
|
-
description ? /* @__PURE__ */ (0,
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Card, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core34.Stack, { gap: "lg", children: [
|
|
2230
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core34.Stack, { gap: "xs", ta: "center", children: [
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Title, { order: 2, children: title }),
|
|
2232
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Text, { c: "dimmed", size: "sm", children: description }) : null
|
|
1340
2233
|
] }),
|
|
2234
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Box, { children: socialAuth }) : null,
|
|
2235
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Divider, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1341
2236
|
children,
|
|
1342
|
-
helper ? /* @__PURE__ */ (0,
|
|
2237
|
+
helper ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Text, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1343
2238
|
] }) }),
|
|
1344
|
-
footer ? /* @__PURE__ */ (0,
|
|
2239
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core34.Text, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1345
2240
|
] }) }) });
|
|
1346
2241
|
}
|
|
1347
2242
|
|
|
2243
|
+
// src/SocialAuthButtons.tsx
|
|
2244
|
+
var import_core35 = require("@mantine/core");
|
|
2245
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2246
|
+
var providerConfig = {
|
|
2247
|
+
google: { label: "Google", mark: "G", color: "red" },
|
|
2248
|
+
apple: { label: "Apple", mark: "A", color: "dark" },
|
|
2249
|
+
github: { label: "GitHub", mark: "GH", color: "gray" },
|
|
2250
|
+
facebook: { label: "Facebook", mark: "F", color: "blue" },
|
|
2251
|
+
microsoft: { label: "Microsoft", mark: "M", color: "cyan" },
|
|
2252
|
+
linkedin: { label: "LinkedIn", mark: "in", color: "blue" },
|
|
2253
|
+
discord: { label: "Discord", mark: "D", color: "indigo" },
|
|
2254
|
+
x: { label: "X", mark: "X", color: "dark" },
|
|
2255
|
+
email: { label: "Email", mark: "@", color: "gray" }
|
|
2256
|
+
};
|
|
2257
|
+
function ProviderMark({ id }) {
|
|
2258
|
+
const config = providerConfig[id] ?? { label: id, mark: id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
2259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.ThemeIcon, { variant: "light", color: config.color, radius: "xl", size: "md", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Text, { size: "xs", fw: 700, children: config.mark }) });
|
|
2260
|
+
}
|
|
2261
|
+
function SocialAuthButton({ provider, compact = false }) {
|
|
2262
|
+
const config = providerConfig[provider.id] ?? { label: provider.id, mark: provider.id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
2263
|
+
const label = provider.label ?? `Continue with ${config.label}`;
|
|
2264
|
+
const buttonProps = provider.href ? { component: "a", href: provider.href } : { onClick: provider.onClick };
|
|
2265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2266
|
+
import_core35.Button,
|
|
2267
|
+
{
|
|
2268
|
+
variant: "default",
|
|
2269
|
+
justify: "space-between",
|
|
2270
|
+
fullWidth: true,
|
|
2271
|
+
size: compact ? "sm" : "md",
|
|
2272
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ProviderMark, { id: provider.id }),
|
|
2273
|
+
disabled: provider.disabled,
|
|
2274
|
+
loading: provider.loading,
|
|
2275
|
+
...buttonProps,
|
|
2276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core35.Stack, { gap: 0, align: "flex-start", children: [
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Text, { inherit: true, children: label }),
|
|
2278
|
+
provider.description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Text, { size: "xs", c: "dimmed", lh: 1.2, children: provider.description }) : null
|
|
2279
|
+
] })
|
|
2280
|
+
}
|
|
2281
|
+
);
|
|
2282
|
+
}
|
|
2283
|
+
function SocialAuthButtons({
|
|
2284
|
+
providers,
|
|
2285
|
+
title = "Continue with a trusted provider",
|
|
2286
|
+
description,
|
|
2287
|
+
layout = "stack",
|
|
2288
|
+
compact = false
|
|
2289
|
+
}) {
|
|
2290
|
+
if (!providers.length) {
|
|
2291
|
+
return null;
|
|
2292
|
+
}
|
|
2293
|
+
const content = providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SocialAuthButton, { provider, compact }, provider.id));
|
|
2294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core35.Stack, { gap: "md", children: [
|
|
2295
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core35.Stack, { gap: 4, ta: "center", children: [
|
|
2296
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core35.Group, { justify: "center", gap: "xs", children: [
|
|
2297
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(GdsIcons.Login, { size: "1rem" }),
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Text, { fw: 600, children: title })
|
|
2299
|
+
] }),
|
|
2300
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
2301
|
+
] }),
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Divider, {}),
|
|
2303
|
+
layout === "grid" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core35.Stack, { gap: "sm", children: content })
|
|
2304
|
+
] });
|
|
2305
|
+
}
|
|
2306
|
+
|
|
1348
2307
|
// src/ArticleShell.tsx
|
|
1349
|
-
var
|
|
1350
|
-
var
|
|
2308
|
+
var import_core36 = require("@mantine/core");
|
|
2309
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1351
2310
|
function ArticleShell({ eyebrow, title, lead, meta, sideRail, children }) {
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1357
|
-
lead ? /* @__PURE__ */ (0,
|
|
1358
|
-
meta ? /* @__PURE__ */ (0,
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core36.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core36.Stack, { gap: "lg", maw: 760, flex: 1, children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core36.Stack, { gap: "sm", children: [
|
|
2314
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Text, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Title, { order: 1, children: title }),
|
|
2316
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
2317
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Group, { gap: "md", children: meta }) : null
|
|
1359
2318
|
] }),
|
|
1360
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Stack, { gap: "md", children })
|
|
1361
2320
|
] }),
|
|
1362
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
2321
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core36.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1363
2322
|
] }) });
|
|
1364
2323
|
}
|
|
1365
2324
|
|
|
1366
2325
|
// src/DocsCodeBlock.tsx
|
|
1367
|
-
var
|
|
1368
|
-
var
|
|
1369
|
-
var
|
|
2326
|
+
var import_react6 = require("react");
|
|
2327
|
+
var import_core37 = require("@mantine/core");
|
|
2328
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1370
2329
|
function DocsCodeBlock({ code, language, title, withCopy = true }) {
|
|
1371
|
-
const [copied, setCopied] = (0,
|
|
2330
|
+
const [copied, setCopied] = (0, import_react6.useState)(false);
|
|
1372
2331
|
const handleCopy = async () => {
|
|
1373
2332
|
if (!navigator?.clipboard) {
|
|
1374
2333
|
return;
|
|
@@ -1377,44 +2336,44 @@ function DocsCodeBlock({ code, language, title, withCopy = true }) {
|
|
|
1377
2336
|
setCopied(true);
|
|
1378
2337
|
window.setTimeout(() => setCopied(false), 1200);
|
|
1379
2338
|
};
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1381
|
-
title || withCopy ? /* @__PURE__ */ (0,
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1383
|
-
title ? /* @__PURE__ */ (0,
|
|
1384
|
-
language ? /* @__PURE__ */ (0,
|
|
2339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core37.Paper, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core37.Stack, { gap: "sm", children: [
|
|
2340
|
+
title || withCopy ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core37.Group, { justify: "space-between", align: "center", children: [
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core37.Stack, { gap: 0, children: [
|
|
2342
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core37.Text, { fw: 600, children: title }) : null,
|
|
2343
|
+
language ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core37.Text, { size: "xs", c: "dimmed", children: language }) : null
|
|
1385
2344
|
] }),
|
|
1386
|
-
withCopy ? /* @__PURE__ */ (0,
|
|
1387
|
-
|
|
2345
|
+
withCopy ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2346
|
+
import_core37.ActionIcon,
|
|
1388
2347
|
{
|
|
1389
2348
|
variant: "subtle",
|
|
1390
2349
|
"aria-label": copied ? "Copied code block" : "Copy code block",
|
|
1391
2350
|
onClick: () => {
|
|
1392
2351
|
void handleCopy();
|
|
1393
2352
|
},
|
|
1394
|
-
children: /* @__PURE__ */ (0,
|
|
2353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GdsIcons.Copy, { size: "1rem" })
|
|
1395
2354
|
}
|
|
1396
2355
|
) : null
|
|
1397
2356
|
] }) : null,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core37.Code, { block: true, children: code })
|
|
1399
2358
|
] }) });
|
|
1400
2359
|
}
|
|
1401
2360
|
|
|
1402
2361
|
// src/CtaButtonGroup.tsx
|
|
1403
|
-
var
|
|
1404
|
-
var
|
|
2362
|
+
var import_core38 = require("@mantine/core");
|
|
2363
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1405
2364
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1406
|
-
return /* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
1408
|
-
/* @__PURE__ */ (0,
|
|
1409
|
-
secondary ? /* @__PURE__ */ (0,
|
|
2365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core38.Stack, { gap: "sm", children: [
|
|
2366
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core38.Group, { gap: "sm", align: "stretch", children: [
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: primary }),
|
|
2368
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: secondary }) : null
|
|
1410
2369
|
] }),
|
|
1411
|
-
tertiary ? /* @__PURE__ */ (0,
|
|
2370
|
+
tertiary ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: tertiary }) : null
|
|
1412
2371
|
] });
|
|
1413
2372
|
}
|
|
1414
2373
|
|
|
1415
2374
|
// src/DocsPageShell.tsx
|
|
1416
|
-
var
|
|
1417
|
-
var
|
|
2375
|
+
var import_core39 = require("@mantine/core");
|
|
2376
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1418
2377
|
function DocsPageShell({
|
|
1419
2378
|
breadcrumbs = [],
|
|
1420
2379
|
title,
|
|
@@ -1425,27 +2384,27 @@ function DocsPageShell({
|
|
|
1425
2384
|
footerNext,
|
|
1426
2385
|
children
|
|
1427
2386
|
}) {
|
|
1428
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
-
/* @__PURE__ */ (0,
|
|
1430
|
-
breadcrumbs.length ? /* @__PURE__ */ (0,
|
|
1431
|
-
(crumb) => crumb.href ? /* @__PURE__ */ (0,
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core39.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core39.Stack, { component: "article", gap: "lg", maw: 760, flex: 1, children: [
|
|
2389
|
+
breadcrumbs.length ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Breadcrumbs, { children: breadcrumbs.map(
|
|
2390
|
+
(crumb) => crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Anchor, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Text, { children: crumb.label }, crumb.label)
|
|
1432
2391
|
) }) : null,
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1435
|
-
/* @__PURE__ */ (0,
|
|
1436
|
-
lead ? /* @__PURE__ */ (0,
|
|
1437
|
-
meta ? /* @__PURE__ */ (0,
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core39.Stack, { gap: "sm", children: [
|
|
2393
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Text, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Title, { order: 1, children: title }),
|
|
2395
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
2396
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Group, { gap: "md", children: meta }) : null
|
|
1438
2397
|
] }),
|
|
1439
|
-
/* @__PURE__ */ (0,
|
|
1440
|
-
footerNext ? /* @__PURE__ */ (0,
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Stack, { gap: "md", children }),
|
|
2399
|
+
footerNext ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Anchor, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1441
2400
|
] }),
|
|
1442
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
2401
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core39.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1443
2402
|
] }) });
|
|
1444
2403
|
}
|
|
1445
2404
|
|
|
1446
2405
|
// src/EditorialHero.tsx
|
|
1447
|
-
var
|
|
1448
|
-
var
|
|
2406
|
+
var import_core40 = require("@mantine/core");
|
|
2407
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1449
2408
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1450
2409
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1451
2410
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1457,8 +2416,8 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1457
2416
|
return { variant: "default", seenPrimary };
|
|
1458
2417
|
}
|
|
1459
2418
|
function HeroAction({ action, variant }) {
|
|
1460
|
-
const content = /* @__PURE__ */ (0,
|
|
1461
|
-
|
|
2419
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2420
|
+
import_core40.Anchor,
|
|
1462
2421
|
{
|
|
1463
2422
|
href: action.href,
|
|
1464
2423
|
onClick: action.onClick,
|
|
@@ -1482,8 +2441,8 @@ function HeroAction({ action, variant }) {
|
|
|
1482
2441
|
}
|
|
1483
2442
|
);
|
|
1484
2443
|
if (!action.href) {
|
|
1485
|
-
return /* @__PURE__ */ (0,
|
|
1486
|
-
|
|
2444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2445
|
+
import_core40.Box,
|
|
1487
2446
|
{
|
|
1488
2447
|
component: "button",
|
|
1489
2448
|
type: "button",
|
|
@@ -1510,30 +2469,30 @@ function HeroAction({ action, variant }) {
|
|
|
1510
2469
|
return content;
|
|
1511
2470
|
}
|
|
1512
2471
|
function LoadingHero({ compact }) {
|
|
1513
|
-
return /* @__PURE__ */ (0,
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1515
|
-
/* @__PURE__ */ (0,
|
|
1516
|
-
/* @__PURE__ */ (0,
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1518
|
-
/* @__PURE__ */ (0,
|
|
1519
|
-
/* @__PURE__ */ (0,
|
|
1520
|
-
/* @__PURE__ */ (0,
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
2472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Paper, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Stack, { gap: "md", children: [
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 16, width: 96, radius: "xl" }),
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 48, width: "90%", radius: "md" }),
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 18, width: "100%", radius: "md" }),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 18, width: "82%", radius: "md" }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Group, { children: [
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 40, width: 140, radius: "md" }),
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { height: 40, width: 140, radius: "md" })
|
|
1522
2481
|
] })
|
|
1523
2482
|
] }) }),
|
|
1524
|
-
/* @__PURE__ */ (0,
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Skeleton, { radius: "lg" }) }) })
|
|
1525
2484
|
] }) });
|
|
1526
2485
|
}
|
|
1527
2486
|
function MediaFallback() {
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
-
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2488
|
+
import_core40.ThemeIcon,
|
|
1530
2489
|
{
|
|
1531
2490
|
size: "100%",
|
|
1532
2491
|
radius: "lg",
|
|
1533
2492
|
color: "gray",
|
|
1534
2493
|
variant: "light",
|
|
1535
2494
|
"aria-label": "Hero media is unavailable",
|
|
1536
|
-
children: /* @__PURE__ */ (0,
|
|
2495
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(GdsIcons.Gallery, { size: "2.5rem" })
|
|
1537
2496
|
}
|
|
1538
2497
|
) });
|
|
1539
2498
|
}
|
|
@@ -1553,8 +2512,8 @@ function MediaFrame({
|
|
|
1553
2512
|
} else if (mediaFade === "soft-start") {
|
|
1554
2513
|
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%)";
|
|
1555
2514
|
}
|
|
1556
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
-
|
|
2515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2516
|
+
import_core40.Box,
|
|
1558
2517
|
{
|
|
1559
2518
|
component: "figure",
|
|
1560
2519
|
m: 0,
|
|
@@ -1567,9 +2526,9 @@ function MediaFrame({
|
|
|
1567
2526
|
},
|
|
1568
2527
|
"aria-label": mediaAlt,
|
|
1569
2528
|
children: [
|
|
1570
|
-
media ?? /* @__PURE__ */ (0,
|
|
1571
|
-
media && overlayBackground ? /* @__PURE__ */ (0,
|
|
1572
|
-
|
|
2529
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MediaFallback, {}),
|
|
2530
|
+
media && overlayBackground ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2531
|
+
import_core40.Box,
|
|
1573
2532
|
{
|
|
1574
2533
|
"aria-hidden": true,
|
|
1575
2534
|
style: {
|
|
@@ -1602,7 +2561,7 @@ function EditorialHero({
|
|
|
1602
2561
|
classNames
|
|
1603
2562
|
}) {
|
|
1604
2563
|
if (loading) {
|
|
1605
|
-
return /* @__PURE__ */ (0,
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LoadingHero, { compact });
|
|
1606
2565
|
}
|
|
1607
2566
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
1608
2567
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -1610,15 +2569,15 @@ function EditorialHero({
|
|
|
1610
2569
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
1611
2570
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
1612
2571
|
seenPrimary = resolved.seenPrimary;
|
|
1613
|
-
return /* @__PURE__ */ (0,
|
|
2572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
1614
2573
|
});
|
|
1615
|
-
const textSlot = /* @__PURE__ */ (0,
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1617
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1619
|
-
description ? /* @__PURE__ */ (0,
|
|
2574
|
+
const textSlot = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Stack, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Stack, { gap: "sm", align: stackAlign, children: [
|
|
2576
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Text, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
2577
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Title, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
2578
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Text, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
1620
2579
|
] }),
|
|
1621
|
-
renderedActions.length ? /* @__PURE__ */ (0,
|
|
2580
|
+
renderedActions.length ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Box, { className: classNames?.actions, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1622
2581
|
CtaButtonGroup,
|
|
1623
2582
|
{
|
|
1624
2583
|
primary: renderedActions[0],
|
|
@@ -1626,8 +2585,8 @@ function EditorialHero({
|
|
|
1626
2585
|
tertiary: renderedActions[2]
|
|
1627
2586
|
}
|
|
1628
2587
|
) }) : null,
|
|
1629
|
-
meta.length ? /* @__PURE__ */ (0,
|
|
1630
|
-
|
|
2588
|
+
meta.length ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Group, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2589
|
+
import_core40.Group,
|
|
1631
2590
|
{
|
|
1632
2591
|
gap: 6,
|
|
1633
2592
|
px: "sm",
|
|
@@ -1638,17 +2597,17 @@ function EditorialHero({
|
|
|
1638
2597
|
},
|
|
1639
2598
|
children: [
|
|
1640
2599
|
item.icon,
|
|
1641
|
-
/* @__PURE__ */ (0,
|
|
2600
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
1642
2601
|
]
|
|
1643
2602
|
},
|
|
1644
2603
|
item.id
|
|
1645
2604
|
)) }) : null
|
|
1646
2605
|
] });
|
|
1647
|
-
const mediaSlot = error ? /* @__PURE__ */ (0,
|
|
1648
|
-
const textCol = /* @__PURE__ */ (0,
|
|
1649
|
-
const mediaCol = /* @__PURE__ */ (0,
|
|
1650
|
-
return /* @__PURE__ */ (0,
|
|
1651
|
-
|
|
2606
|
+
const mediaSlot = error ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
2607
|
+
const textCol = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
2608
|
+
const mediaCol = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core40.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2610
|
+
import_core40.Paper,
|
|
1652
2611
|
{
|
|
1653
2612
|
component: "section",
|
|
1654
2613
|
withBorder: true,
|
|
@@ -1656,7 +2615,7 @@ function EditorialHero({
|
|
|
1656
2615
|
p: compact ? "lg" : "xl",
|
|
1657
2616
|
className: classNames?.root,
|
|
1658
2617
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
1659
|
-
children: /* @__PURE__ */ (0,
|
|
2618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core40.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1660
2619
|
textCol,
|
|
1661
2620
|
mediaCol
|
|
1662
2621
|
] })
|
|
@@ -1665,19 +2624,19 @@ function EditorialHero({
|
|
|
1665
2624
|
}
|
|
1666
2625
|
|
|
1667
2626
|
// src/FeatureBand.tsx
|
|
1668
|
-
var
|
|
1669
|
-
var
|
|
2627
|
+
var import_core41 = require("@mantine/core");
|
|
2628
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1670
2629
|
function FeatureBandSkeleton({
|
|
1671
2630
|
columns = 3,
|
|
1672
2631
|
bordered = true,
|
|
1673
2632
|
variant = "default"
|
|
1674
2633
|
}) {
|
|
1675
|
-
return /* @__PURE__ */ (0,
|
|
1676
|
-
/* @__PURE__ */ (0,
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1680
|
-
/* @__PURE__ */ (0,
|
|
2634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core41.Stack, { gap: "md", children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Skeleton, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core41.Stack, { gap: "xs", children: [
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Skeleton, { height: 20, width: "75%", radius: "md" }),
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Skeleton, { height: 14, width: "100%", radius: "md" }),
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Skeleton, { height: 14, width: "82%", radius: "md" })
|
|
1681
2640
|
] })
|
|
1682
2641
|
] }) }, index)) });
|
|
1683
2642
|
}
|
|
@@ -1690,10 +2649,10 @@ function FeatureBand({
|
|
|
1690
2649
|
variant = "default"
|
|
1691
2650
|
}) {
|
|
1692
2651
|
if (loading) {
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
2652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FeatureBandSkeleton, { columns, bordered, variant });
|
|
1694
2653
|
}
|
|
1695
2654
|
if (!items.length) {
|
|
1696
|
-
return emptyState ? /* @__PURE__ */ (0,
|
|
2655
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1697
2656
|
EmptyState,
|
|
1698
2657
|
{
|
|
1699
2658
|
title: "No supporting details available",
|
|
@@ -1701,9 +2660,9 @@ function FeatureBand({
|
|
|
1701
2660
|
}
|
|
1702
2661
|
);
|
|
1703
2662
|
}
|
|
1704
|
-
return /* @__PURE__ */ (0,
|
|
1705
|
-
variant === "process" ? /* @__PURE__ */ (0,
|
|
1706
|
-
|
|
2663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Box, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core41.Stack, { gap: "md", children: [
|
|
2664
|
+
variant === "process" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2665
|
+
import_core41.Text,
|
|
1707
2666
|
{
|
|
1708
2667
|
fw: 800,
|
|
1709
2668
|
size: "sm",
|
|
@@ -1715,19 +2674,352 @@ function FeatureBand({
|
|
|
1715
2674
|
},
|
|
1716
2675
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
1717
2676
|
}
|
|
1718
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0,
|
|
1719
|
-
/* @__PURE__ */ (0,
|
|
1720
|
-
/* @__PURE__ */ (0,
|
|
1721
|
-
item.description ? /* @__PURE__ */ (0,
|
|
1722
|
-
item.meta ? /* @__PURE__ */ (0,
|
|
2677
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core41.Stack, { gap: "xs", children: [
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Title, { order: 4, children: item.title }),
|
|
2680
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Text, { c: "dimmed", children: item.description }) : null,
|
|
2681
|
+
item.meta ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core41.Text, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
1723
2682
|
] })
|
|
1724
2683
|
] }) }, item.id)) }) });
|
|
1725
2684
|
}
|
|
1726
2685
|
|
|
2686
|
+
// src/MapPanel.tsx
|
|
2687
|
+
var import_core42 = require("@mantine/core");
|
|
2688
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2689
|
+
function MapPanel({
|
|
2690
|
+
title,
|
|
2691
|
+
description,
|
|
2692
|
+
actions,
|
|
2693
|
+
loading = false,
|
|
2694
|
+
empty,
|
|
2695
|
+
error,
|
|
2696
|
+
embedTitle,
|
|
2697
|
+
iframeSrc,
|
|
2698
|
+
iframeSandbox = "allow-scripts allow-same-origin allow-popups",
|
|
2699
|
+
renderMap,
|
|
2700
|
+
minHeight = 320
|
|
2701
|
+
}) {
|
|
2702
|
+
let body;
|
|
2703
|
+
if (loading) {
|
|
2704
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2705
|
+
StateBlock,
|
|
2706
|
+
{
|
|
2707
|
+
variant: "loading",
|
|
2708
|
+
title: "Loading map",
|
|
2709
|
+
description: "The shared map panel is still preparing the embedded surface.",
|
|
2710
|
+
compact: true
|
|
2711
|
+
}
|
|
2712
|
+
);
|
|
2713
|
+
} else if (error) {
|
|
2714
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2715
|
+
} else if (!iframeSrc && !renderMap) {
|
|
2716
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2717
|
+
StateBlock,
|
|
2718
|
+
{
|
|
2719
|
+
variant: "empty",
|
|
2720
|
+
title: "No map available",
|
|
2721
|
+
description: empty ?? "Add coordinates or a sanctioned embed source to render this panel.",
|
|
2722
|
+
compact: true
|
|
2723
|
+
}
|
|
2724
|
+
);
|
|
2725
|
+
} else if (renderMap) {
|
|
2726
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core42.Box, { style: { minHeight }, children: renderMap() });
|
|
2727
|
+
} else {
|
|
2728
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core42.AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2729
|
+
"iframe",
|
|
2730
|
+
{
|
|
2731
|
+
src: iframeSrc,
|
|
2732
|
+
title: embedTitle ?? "Embedded map",
|
|
2733
|
+
sandbox: iframeSandbox,
|
|
2734
|
+
loading: "lazy",
|
|
2735
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
2736
|
+
style: { width: "100%", height: "100%", border: 0, borderRadius: 12 }
|
|
2737
|
+
}
|
|
2738
|
+
) });
|
|
2739
|
+
}
|
|
2740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core42.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core42.Stack, { gap: "md", children: [
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core42.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core42.Stack, { gap: 4, children: [
|
|
2743
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core42.Title, { order: 3, children: title }),
|
|
2744
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core42.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
2745
|
+
] }),
|
|
2746
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ActionBar, { ...actions }) : null
|
|
2747
|
+
] }),
|
|
2748
|
+
body
|
|
2749
|
+
] }) });
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
// src/PublicFlowShell.tsx
|
|
2753
|
+
var import_core43 = require("@mantine/core");
|
|
2754
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2755
|
+
var stageTone = {
|
|
2756
|
+
idle: { label: "Idle", color: "gray" },
|
|
2757
|
+
loading: { label: "Loading", color: "blue" },
|
|
2758
|
+
ready: { label: "Ready", color: "teal" },
|
|
2759
|
+
error: { label: "Error", color: "red" },
|
|
2760
|
+
complete: { label: "Complete", color: "teal" }
|
|
2761
|
+
};
|
|
2762
|
+
function toActionBar(actions = []) {
|
|
2763
|
+
if (!actions.length) {
|
|
2764
|
+
return void 0;
|
|
2765
|
+
}
|
|
2766
|
+
const ordered = [...actions].sort((left, right) => {
|
|
2767
|
+
const rank = { primary: 0, secondary: 1, tertiary: 2 };
|
|
2768
|
+
return rank[left.priority] - rank[right.priority];
|
|
2769
|
+
});
|
|
2770
|
+
const primary = ordered.find((action) => action.priority === "primary");
|
|
2771
|
+
const secondary = ordered.filter((action) => action.priority === "secondary");
|
|
2772
|
+
const tertiary = ordered.filter((action) => action.priority === "tertiary");
|
|
2773
|
+
return {
|
|
2774
|
+
primary: primary ? {
|
|
2775
|
+
action: primary.action,
|
|
2776
|
+
disabled: primary.disabled,
|
|
2777
|
+
loading: primary.loading,
|
|
2778
|
+
onClick: primary.onClick
|
|
2779
|
+
} : void 0,
|
|
2780
|
+
secondary: secondary.map((action) => ({
|
|
2781
|
+
action: action.action,
|
|
2782
|
+
disabled: action.disabled,
|
|
2783
|
+
loading: action.loading,
|
|
2784
|
+
onClick: action.onClick
|
|
2785
|
+
})),
|
|
2786
|
+
tertiary: tertiary.map((action) => ({
|
|
2787
|
+
action: action.action,
|
|
2788
|
+
disabled: action.disabled,
|
|
2789
|
+
loading: action.loading,
|
|
2790
|
+
onClick: action.onClick
|
|
2791
|
+
}))
|
|
2792
|
+
};
|
|
2793
|
+
}
|
|
2794
|
+
function PublicFlowShell({
|
|
2795
|
+
stage,
|
|
2796
|
+
eyebrow,
|
|
2797
|
+
exitAction,
|
|
2798
|
+
hardwareSurface,
|
|
2799
|
+
emptyState,
|
|
2800
|
+
errorState
|
|
2801
|
+
}) {
|
|
2802
|
+
const tone = stageTone[stage.status];
|
|
2803
|
+
const actionBar = toActionBar(stage.actions);
|
|
2804
|
+
let body = stage.body;
|
|
2805
|
+
if (stage.status === "loading") {
|
|
2806
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2807
|
+
StateBlock,
|
|
2808
|
+
{
|
|
2809
|
+
variant: "loading",
|
|
2810
|
+
title: "Preparing flow",
|
|
2811
|
+
description: stage.description ?? "The current public flow stage is still loading."
|
|
2812
|
+
}
|
|
2813
|
+
);
|
|
2814
|
+
} else if (stage.status === "error") {
|
|
2815
|
+
body = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2816
|
+
StateBlock,
|
|
2817
|
+
{
|
|
2818
|
+
variant: "error",
|
|
2819
|
+
title: "Flow unavailable",
|
|
2820
|
+
description: stage.description ?? "This public flow could not continue safely."
|
|
2821
|
+
}
|
|
2822
|
+
);
|
|
2823
|
+
} else if (!stage.body && !hardwareSurface) {
|
|
2824
|
+
body = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2825
|
+
EmptyState,
|
|
2826
|
+
{
|
|
2827
|
+
title: "No stage content available",
|
|
2828
|
+
description: "Add the current flow stage body or a bounded hardware surface to render this contract."
|
|
2829
|
+
}
|
|
2830
|
+
);
|
|
2831
|
+
}
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core43.Stack, { gap: "lg", children: [
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core43.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core43.Stack, { gap: 4, children: [
|
|
2835
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core43.Group, { gap: "sm", wrap: "wrap", children: [
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Title, { order: 2, children: stage.title }),
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Badge, { variant: "light", color: tone.color, children: tone.label })
|
|
2839
|
+
] }),
|
|
2840
|
+
stage.description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Text, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2841
|
+
] }),
|
|
2842
|
+
exitAction
|
|
2843
|
+
] }),
|
|
2844
|
+
stage.notice ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core43.Text, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2845
|
+
body,
|
|
2846
|
+
hardwareSurface,
|
|
2847
|
+
stage.aside,
|
|
2848
|
+
actionBar ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ActionBar, { ...actionBar }) : null
|
|
2849
|
+
] }) });
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
// src/PlaybackSurface.tsx
|
|
2853
|
+
var import_core44 = require("@mantine/core");
|
|
2854
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2855
|
+
var stateTone = {
|
|
2856
|
+
loading: { label: "Loading", color: "blue" },
|
|
2857
|
+
ready: { label: "Ready", color: "teal" },
|
|
2858
|
+
playing: { label: "Playing", color: "teal" },
|
|
2859
|
+
empty: { label: "Empty", color: "gray" },
|
|
2860
|
+
error: { label: "Error", color: "red" },
|
|
2861
|
+
degraded: { label: "Degraded", color: "orange" }
|
|
2862
|
+
};
|
|
2863
|
+
function PlaybackSurface({
|
|
2864
|
+
title,
|
|
2865
|
+
state,
|
|
2866
|
+
media,
|
|
2867
|
+
statusMessage,
|
|
2868
|
+
controls,
|
|
2869
|
+
emptyState,
|
|
2870
|
+
errorState,
|
|
2871
|
+
overlays,
|
|
2872
|
+
mode = "embedded"
|
|
2873
|
+
}) {
|
|
2874
|
+
const tone = stateTone[state];
|
|
2875
|
+
let content;
|
|
2876
|
+
if (state === "loading") {
|
|
2877
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2878
|
+
StateBlock,
|
|
2879
|
+
{
|
|
2880
|
+
variant: "loading",
|
|
2881
|
+
title: "Loading playback",
|
|
2882
|
+
description: "The playback surface is still preparing timed or fullscreen media."
|
|
2883
|
+
}
|
|
2884
|
+
);
|
|
2885
|
+
} else if (state === "empty") {
|
|
2886
|
+
content = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2887
|
+
EmptyState,
|
|
2888
|
+
{
|
|
2889
|
+
title: "No playback content available",
|
|
2890
|
+
description: "Add media assets or a playlist to render this playback surface."
|
|
2891
|
+
}
|
|
2892
|
+
);
|
|
2893
|
+
} else if (state === "error") {
|
|
2894
|
+
content = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2895
|
+
StateBlock,
|
|
2896
|
+
{
|
|
2897
|
+
variant: "error",
|
|
2898
|
+
title: "Playback unavailable",
|
|
2899
|
+
description: "The playback surface could not render the current media safely."
|
|
2900
|
+
}
|
|
2901
|
+
);
|
|
2902
|
+
} else {
|
|
2903
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core44.Stack, { gap: "md", children: [
|
|
2904
|
+
media,
|
|
2905
|
+
overlays
|
|
2906
|
+
] });
|
|
2907
|
+
}
|
|
2908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core44.Paper, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core44.Stack, { gap: "md", children: [
|
|
2909
|
+
title || statusMessage || controls ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core44.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core44.Stack, { gap: 4, children: [
|
|
2911
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core44.Title, { order: 3, children: title }) : null,
|
|
2912
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core44.Text, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2913
|
+
] }),
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core44.Group, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core44.Badge, { variant: "light", color: tone.color, children: tone.label }),
|
|
2916
|
+
controls
|
|
2917
|
+
] })
|
|
2918
|
+
] }) : null,
|
|
2919
|
+
state === "degraded" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2920
|
+
StateBlock,
|
|
2921
|
+
{
|
|
2922
|
+
variant: "info",
|
|
2923
|
+
title: "Playback degraded",
|
|
2924
|
+
description: statusMessage ?? "Playback is continuing with reduced fidelity or recoverable media failures.",
|
|
2925
|
+
compact: true
|
|
2926
|
+
}
|
|
2927
|
+
) : null,
|
|
2928
|
+
content
|
|
2929
|
+
] }) });
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
// src/ShareButtonGroup.tsx
|
|
2933
|
+
var import_react7 = require("react");
|
|
2934
|
+
var import_core45 = require("@mantine/core");
|
|
2935
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2936
|
+
var channelLabels = {
|
|
2937
|
+
native: "Share",
|
|
2938
|
+
copy: "Copy link",
|
|
2939
|
+
mail: "Email",
|
|
2940
|
+
message: "Message",
|
|
2941
|
+
x: "Share on X",
|
|
2942
|
+
facebook: "Share on Facebook",
|
|
2943
|
+
linkedin: "Share on LinkedIn",
|
|
2944
|
+
whatsapp: "Share on WhatsApp",
|
|
2945
|
+
telegram: "Share on Telegram"
|
|
2946
|
+
};
|
|
2947
|
+
function encodeShare(url, title, text) {
|
|
2948
|
+
const safeUrl = encodeURIComponent(url);
|
|
2949
|
+
const safeTitle = encodeURIComponent(title ?? "");
|
|
2950
|
+
const safeText = encodeURIComponent(text ?? title ?? "");
|
|
2951
|
+
return {
|
|
2952
|
+
mail: `mailto:?subject=${safeTitle}&body=${safeText ? `${safeText}%0A%0A` : ""}${safeUrl}`,
|
|
2953
|
+
message: `sms:?&body=${safeText ? `${safeText}%20` : ""}${safeUrl}`,
|
|
2954
|
+
x: `https://x.com/intent/tweet?text=${safeText ? `${safeText}%20` : ""}${safeUrl}`,
|
|
2955
|
+
facebook: `https://www.facebook.com/sharer/sharer.php?u=${safeUrl}`,
|
|
2956
|
+
linkedin: `https://www.linkedin.com/sharing/share-offsite/?url=${safeUrl}`,
|
|
2957
|
+
whatsapp: `https://wa.me/?text=${safeText ? `${safeText}%20` : ""}${safeUrl}`,
|
|
2958
|
+
telegram: `https://t.me/share/url?url=${safeUrl}&text=${safeText}`
|
|
2959
|
+
};
|
|
2960
|
+
}
|
|
2961
|
+
function ShareAction({
|
|
2962
|
+
channel,
|
|
2963
|
+
compact,
|
|
2964
|
+
href,
|
|
2965
|
+
onClick
|
|
2966
|
+
}) {
|
|
2967
|
+
const label = channelLabels[channel];
|
|
2968
|
+
const Icon = channel === "copy" ? GdsIcons.Copy : channel === "mail" ? GdsIcons.Mail : channel === "message" ? GdsIcons.Message : GdsIcons.Refer;
|
|
2969
|
+
if (compact) {
|
|
2970
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.ActionIcon, { component: "a", href, target: "_blank", rel: "noreferrer", variant: "subtle", size: "lg", "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { size: "1rem", stroke: 1.75 }) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.ActionIcon, { variant: "subtle", size: "lg", "aria-label": label, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { size: "1rem", stroke: 1.75 }) });
|
|
2971
|
+
}
|
|
2972
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Button, { component: "a", href, target: "_blank", rel: "noreferrer", variant: "default", leftSection: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { size: "1rem", stroke: 1.75 }), children: label }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Button, { variant: "default", leftSection: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { size: "1rem", stroke: 1.75 }), onClick, children: label });
|
|
2973
|
+
}
|
|
2974
|
+
function ShareButtonGroup({
|
|
2975
|
+
url,
|
|
2976
|
+
title,
|
|
2977
|
+
text,
|
|
2978
|
+
channels = ["native", "copy", "mail"],
|
|
2979
|
+
compact = false,
|
|
2980
|
+
label = "Share this",
|
|
2981
|
+
description
|
|
2982
|
+
}) {
|
|
2983
|
+
const [copied, setCopied] = (0, import_react7.useState)(false);
|
|
2984
|
+
const [shared, setShared] = (0, import_react7.useState)(false);
|
|
2985
|
+
const hrefs = encodeShare(url, title, text);
|
|
2986
|
+
async function handleCopy() {
|
|
2987
|
+
await navigator.clipboard?.writeText?.(url);
|
|
2988
|
+
setCopied(true);
|
|
2989
|
+
setTimeout(() => setCopied(false), 1800);
|
|
2990
|
+
}
|
|
2991
|
+
async function handleNativeShare() {
|
|
2992
|
+
if (navigator.share) {
|
|
2993
|
+
await navigator.share({ url, title, text });
|
|
2994
|
+
setShared(true);
|
|
2995
|
+
setTimeout(() => setShared(false), 1800);
|
|
2996
|
+
return;
|
|
2997
|
+
}
|
|
2998
|
+
await handleCopy();
|
|
2999
|
+
}
|
|
3000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_core45.Stack, { gap: "sm", children: [
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_core45.Stack, { gap: 2, children: [
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Text, { fw: 600, children: label }),
|
|
3003
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
3004
|
+
] }),
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Group, { gap: "sm", wrap: "wrap", children: channels.map((channel) => {
|
|
3006
|
+
if (channel === "copy") {
|
|
3007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShareAction, { channel, compact, onClick: () => void handleCopy() }, channel);
|
|
3008
|
+
}
|
|
3009
|
+
if (channel === "native") {
|
|
3010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShareAction, { channel, compact, onClick: () => void handleNativeShare() }, channel);
|
|
3011
|
+
}
|
|
3012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShareAction, { channel, compact, href: hrefs[channel] }, channel);
|
|
3013
|
+
}) }),
|
|
3014
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Text, { size: "sm", c: "teal", children: "Link copied." }) : null,
|
|
3015
|
+
shared ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core45.Text, { size: "sm", c: "teal", children: "Share sheet opened." }) : null
|
|
3016
|
+
] });
|
|
3017
|
+
}
|
|
3018
|
+
|
|
1727
3019
|
// src/UploadDropzone.tsx
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
1730
|
-
var
|
|
3020
|
+
var import_react8 = require("react");
|
|
3021
|
+
var import_core46 = require("@mantine/core");
|
|
3022
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1731
3023
|
function UploadDropzone({
|
|
1732
3024
|
title,
|
|
1733
3025
|
description,
|
|
@@ -1737,8 +3029,8 @@ function UploadDropzone({
|
|
|
1737
3029
|
actionLabel = "Choose files",
|
|
1738
3030
|
mode = "panel"
|
|
1739
3031
|
}) {
|
|
1740
|
-
const inputRef = (0,
|
|
1741
|
-
const [dragging, setDragging] = (0,
|
|
3032
|
+
const inputRef = (0, import_react8.useRef)(null);
|
|
3033
|
+
const [dragging, setDragging] = (0, import_react8.useState)(false);
|
|
1742
3034
|
const UploadIcon = GdsIcons.Upload;
|
|
1743
3035
|
const forwardFiles = (files) => {
|
|
1744
3036
|
if (!files?.length || !onFilesSelected) {
|
|
@@ -1746,8 +3038,8 @@ function UploadDropzone({
|
|
|
1746
3038
|
}
|
|
1747
3039
|
onFilesSelected(Array.from(files));
|
|
1748
3040
|
};
|
|
1749
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
-
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3042
|
+
import_core46.Box,
|
|
1751
3043
|
{
|
|
1752
3044
|
onDragOver: (event) => {
|
|
1753
3045
|
event.preventDefault();
|
|
@@ -1766,7 +3058,7 @@ function UploadDropzone({
|
|
|
1766
3058
|
background: dragging ? "var(--mantine-color-violet-light)" : "transparent"
|
|
1767
3059
|
},
|
|
1768
3060
|
children: [
|
|
1769
|
-
/* @__PURE__ */ (0,
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1770
3062
|
"input",
|
|
1771
3063
|
{
|
|
1772
3064
|
ref: inputRef,
|
|
@@ -1777,11 +3069,11 @@ function UploadDropzone({
|
|
|
1777
3069
|
onChange: (event) => forwardFiles(event.currentTarget.files)
|
|
1778
3070
|
}
|
|
1779
3071
|
),
|
|
1780
|
-
/* @__PURE__ */ (0,
|
|
1781
|
-
/* @__PURE__ */ (0,
|
|
1782
|
-
/* @__PURE__ */ (0,
|
|
1783
|
-
description ? /* @__PURE__ */ (0,
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_core46.Stack, { align: mode === "inline" ? "flex-start" : "center", ta: mode === "inline" ? "left" : "center", gap: "sm", children: [
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UploadIcon, { size: "1.5rem" }),
|
|
3074
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core46.Text, { fw: 600, children: title }),
|
|
3075
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core46.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
3076
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core46.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core46.Button, { variant: "light", onClick: () => inputRef.current?.click(), children: actionLabel }) })
|
|
1785
3077
|
] })
|
|
1786
3078
|
]
|
|
1787
3079
|
}
|
|
@@ -1789,22 +3081,8 @@ function UploadDropzone({
|
|
|
1789
3081
|
}
|
|
1790
3082
|
|
|
1791
3083
|
// src/MediaField.tsx
|
|
1792
|
-
var
|
|
1793
|
-
|
|
1794
|
-
// src/FormField.tsx
|
|
1795
|
-
var import_core31 = require("@mantine/core");
|
|
1796
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1797
|
-
function FormField({ label, description, error, children }) {
|
|
1798
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Box, { component: "label", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Stack, { gap: 4, children: [
|
|
1799
|
-
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Text, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
1800
|
-
description ? typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Text, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
1801
|
-
children,
|
|
1802
|
-
error ? typeof error === "string" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Text, { size: "xs", c: "red.7", children: error }) : error : null
|
|
1803
|
-
] }) });
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
// src/MediaField.tsx
|
|
1807
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3084
|
+
var import_core47 = require("@mantine/core");
|
|
3085
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1808
3086
|
var stateLabels = {
|
|
1809
3087
|
empty: { label: "Empty", color: "gray" },
|
|
1810
3088
|
selected: { label: "Selected", color: "blue" },
|
|
@@ -1832,32 +3110,32 @@ function MediaField({
|
|
|
1832
3110
|
mode = "stacked"
|
|
1833
3111
|
}) {
|
|
1834
3112
|
const stateBadge = stateLabels[state];
|
|
1835
|
-
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0,
|
|
1836
|
-
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0,
|
|
1837
|
-
return /* @__PURE__ */ (0,
|
|
3113
|
+
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Button, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
3114
|
+
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Button, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1838
3116
|
FormField,
|
|
1839
3117
|
{
|
|
1840
3118
|
label,
|
|
1841
3119
|
description,
|
|
1842
3120
|
error,
|
|
1843
|
-
children: /* @__PURE__ */ (0,
|
|
1844
|
-
/* @__PURE__ */ (0,
|
|
1845
|
-
/* @__PURE__ */ (0,
|
|
3121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_core47.Stack, { gap: "md", children: [
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Group, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_core47.Group, { gap: "xs", justify: "flex-end", children: [
|
|
3123
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
1846
3124
|
statusAction
|
|
1847
3125
|
] }) }),
|
|
1848
3126
|
preview ? preview : null,
|
|
1849
|
-
uploadControl || urlInput ? /* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1851
|
-
/* @__PURE__ */ (0,
|
|
3127
|
+
uploadControl || urlInput ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Divider, {}),
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_core47.Stack, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
1852
3130
|
uploadControl,
|
|
1853
3131
|
urlInput
|
|
1854
3132
|
] })
|
|
1855
3133
|
] }) : null,
|
|
1856
|
-
value ? /* @__PURE__ */ (0,
|
|
1857
|
-
helpText ? /* @__PURE__ */ (0,
|
|
1858
|
-
policyText ? /* @__PURE__ */ (0,
|
|
3134
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Text, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
3135
|
+
helpText ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Text, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
3136
|
+
policyText ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core47.Text, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
1859
3137
|
typeof error !== "string" && error ? error : null,
|
|
1860
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0,
|
|
3138
|
+
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_core47.Group, { gap: "sm", children: [
|
|
1861
3139
|
resolvedResetAction,
|
|
1862
3140
|
retryAction,
|
|
1863
3141
|
resolvedRemoveAction
|
|
@@ -1868,50 +3146,50 @@ function MediaField({
|
|
|
1868
3146
|
}
|
|
1869
3147
|
|
|
1870
3148
|
// src/MediaCard.tsx
|
|
1871
|
-
var
|
|
1872
|
-
var
|
|
3149
|
+
var import_core48 = require("@mantine/core");
|
|
3150
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1873
3151
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
1874
3152
|
const EyeIcon = GdsIcons.Eye;
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core48.Card, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core48.Card.Section, { pos: "relative", children: [
|
|
1877
3155
|
image,
|
|
1878
|
-
overlay ? /* @__PURE__ */ (0,
|
|
3156
|
+
overlay ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
1879
3157
|
] }),
|
|
1880
|
-
/* @__PURE__ */ (0,
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1884
|
-
description ? /* @__PURE__ */ (0,
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core48.Stack, { gap: "sm", mt: "md", children: [
|
|
3159
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core48.Group, { justify: "space-between", align: "flex-start", children: [
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core48.Stack, { gap: 4, children: [
|
|
3161
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core48.Title, { order: 4, children: title }),
|
|
3162
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core48.Text, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
1885
3163
|
] }),
|
|
1886
|
-
status ? /* @__PURE__ */ (0,
|
|
3164
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core48.Badge, { variant: "light", children: status }) : null
|
|
1887
3165
|
] }),
|
|
1888
|
-
actions.length ? /* @__PURE__ */ (0,
|
|
3166
|
+
actions.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core48.Group, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core48.ActionIcon, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
1889
3167
|
] })
|
|
1890
3168
|
] });
|
|
1891
3169
|
}
|
|
1892
3170
|
|
|
1893
3171
|
// src/AccessSummary.tsx
|
|
1894
|
-
var
|
|
1895
|
-
var
|
|
3172
|
+
var import_core49 = require("@mantine/core");
|
|
3173
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1896
3174
|
function AccessSummary({ title, roles, scope, blocked = false, description }) {
|
|
1897
|
-
return /* @__PURE__ */ (0,
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
3175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core49.Stack, { gap: "sm", children: [
|
|
3176
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core49.Group, { justify: "space-between", align: "center", children: [
|
|
3177
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Title, { order: 4, children: title }),
|
|
3178
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Badge, { color: blocked ? "red" : "teal", variant: "light", children: blocked ? "Blocked" : "Allowed" })
|
|
1901
3179
|
] }),
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
1903
|
-
scope ? /* @__PURE__ */ (0,
|
|
3180
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Group, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Badge, { variant: "outline", children: role }, role)) }),
|
|
3181
|
+
scope ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core49.Text, { size: "sm", c: "dimmed", children: [
|
|
1904
3182
|
"Scope: ",
|
|
1905
3183
|
scope
|
|
1906
3184
|
] }) : null,
|
|
1907
|
-
description ? /* @__PURE__ */ (0,
|
|
3185
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core49.Text, { size: "sm", children: description }) : null
|
|
1908
3186
|
] }) });
|
|
1909
3187
|
}
|
|
1910
3188
|
|
|
1911
3189
|
// src/AccessRecoveryPanel.tsx
|
|
1912
|
-
var
|
|
1913
|
-
var
|
|
1914
|
-
var
|
|
3190
|
+
var import_core50 = require("@mantine/core");
|
|
3191
|
+
var import_gds_theme5 = require("@doneisbetter/gds-theme");
|
|
3192
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1915
3193
|
var stateBlockVariantByState = {
|
|
1916
3194
|
unauthenticated: "permission",
|
|
1917
3195
|
"expired-session": "info",
|
|
@@ -1980,7 +3258,7 @@ function ActionGroup({
|
|
|
1980
3258
|
if (actions.length === 0) {
|
|
1981
3259
|
return null;
|
|
1982
3260
|
}
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
3261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core50.Group, { gap: "sm", justify: "center", wrap: "wrap", children: actions.map((actionConfig, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1984
3262
|
SemanticButton,
|
|
1985
3263
|
{
|
|
1986
3264
|
action: actionConfig.action,
|
|
@@ -2006,7 +3284,7 @@ function AccessRecoveryPanel({
|
|
|
2006
3284
|
supportAction,
|
|
2007
3285
|
compact = false
|
|
2008
3286
|
}) {
|
|
2009
|
-
const { t } = (0,
|
|
3287
|
+
const { t } = (0, import_gds_theme5.useGdsTranslation)();
|
|
2010
3288
|
const defaultCopy = defaultCopyByState[state];
|
|
2011
3289
|
const defaults = defaultActionsForState(state, {
|
|
2012
3290
|
onRetry,
|
|
@@ -2014,14 +3292,14 @@ function AccessRecoveryPanel({
|
|
|
2014
3292
|
onBack,
|
|
2015
3293
|
supportAction
|
|
2016
3294
|
});
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2018
3296
|
StateBlock,
|
|
2019
3297
|
{
|
|
2020
3298
|
variant: stateBlockVariantByState[state],
|
|
2021
3299
|
compact,
|
|
2022
3300
|
title: title ?? t(`gds.accessRecovery.${state}.title`, defaultCopy.title),
|
|
2023
3301
|
description: description ?? t(`gds.accessRecovery.${state}.description`, defaultCopy.description),
|
|
2024
|
-
action: /* @__PURE__ */ (0,
|
|
3302
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2025
3303
|
ActionGroup,
|
|
2026
3304
|
{
|
|
2027
3305
|
primaryAction: primaryAction ?? defaults.primary,
|
|
@@ -2034,8 +3312,8 @@ function AccessRecoveryPanel({
|
|
|
2034
3312
|
}
|
|
2035
3313
|
|
|
2036
3314
|
// src/PageHeader.tsx
|
|
2037
|
-
var
|
|
2038
|
-
var
|
|
3315
|
+
var import_core51 = require("@mantine/core");
|
|
3316
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2039
3317
|
function PageHeader({
|
|
2040
3318
|
title,
|
|
2041
3319
|
description,
|
|
@@ -2046,19 +3324,19 @@ function PageHeader({
|
|
|
2046
3324
|
}) {
|
|
2047
3325
|
const resolvedDescription = description ?? subtitle;
|
|
2048
3326
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
2049
|
-
return /* @__PURE__ */ (0,
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2051
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
resolvedDescription && /* @__PURE__ */ (0,
|
|
3327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_core51.Group, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_core51.Stack, { gap: "xs", children: [
|
|
3329
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core51.Text, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core51.Title, { order: 1, children: title }),
|
|
3331
|
+
resolvedDescription && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core51.Text, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
2054
3332
|
] }),
|
|
2055
|
-
actions ? /* @__PURE__ */ (0,
|
|
3333
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core51.Box, { children: actions }) : null
|
|
2056
3334
|
] });
|
|
2057
3335
|
}
|
|
2058
3336
|
|
|
2059
3337
|
// src/FilterDrawer.tsx
|
|
2060
|
-
var
|
|
2061
|
-
var
|
|
3338
|
+
var import_core52 = require("@mantine/core");
|
|
3339
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2062
3340
|
function FilterDrawer({
|
|
2063
3341
|
opened,
|
|
2064
3342
|
onClose,
|
|
@@ -2074,8 +3352,8 @@ function FilterDrawer({
|
|
|
2074
3352
|
}) {
|
|
2075
3353
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
2076
3354
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
2077
|
-
return /* @__PURE__ */ (0,
|
|
2078
|
-
|
|
3355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3356
|
+
import_core52.Drawer,
|
|
2079
3357
|
{
|
|
2080
3358
|
opened,
|
|
2081
3359
|
onClose,
|
|
@@ -2083,11 +3361,11 @@ function FilterDrawer({
|
|
|
2083
3361
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
2084
3362
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
2085
3363
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
2086
|
-
children: /* @__PURE__ */ (0,
|
|
2087
|
-
description ? /* @__PURE__ */ (0,
|
|
3364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_core52.Stack, { gap: "md", children: [
|
|
3365
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core52.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
2088
3366
|
children,
|
|
2089
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0,
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
3367
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_core52.Group, { justify: "space-between", mt: "md", children: [
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_core52.Group, { gap: "sm", children: [
|
|
2091
3369
|
closeAction,
|
|
2092
3370
|
resolvedSecondaryAction
|
|
2093
3371
|
] }),
|
|
@@ -2099,8 +3377,8 @@ function FilterDrawer({
|
|
|
2099
3377
|
}
|
|
2100
3378
|
|
|
2101
3379
|
// src/PlaceholderPanel.tsx
|
|
2102
|
-
var
|
|
2103
|
-
var
|
|
3380
|
+
var import_core53 = require("@mantine/core");
|
|
3381
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2104
3382
|
function PlaceholderPanel({
|
|
2105
3383
|
title,
|
|
2106
3384
|
description,
|
|
@@ -2110,16 +3388,16 @@ function PlaceholderPanel({
|
|
|
2110
3388
|
mode
|
|
2111
3389
|
}) {
|
|
2112
3390
|
if (mode === "live" && children) {
|
|
2113
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children });
|
|
2114
3392
|
}
|
|
2115
|
-
return /* @__PURE__ */ (0,
|
|
2116
|
-
badge ? /* @__PURE__ */ (0,
|
|
2117
|
-
/* @__PURE__ */ (0,
|
|
2118
|
-
/* @__PURE__ */ (0,
|
|
2119
|
-
/* @__PURE__ */ (0,
|
|
3393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core53.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_core53.Stack, { gap: "md", children: [
|
|
3394
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core53.Badge, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_core53.Stack, { gap: "xs", children: [
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core53.Title, { order: 4, children: title }),
|
|
3397
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core53.Text, { c: "dimmed", children: description })
|
|
2120
3398
|
] }),
|
|
2121
|
-
footer ? /* @__PURE__ */ (0,
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
3399
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core53.Text, { size: "sm", children: footer }) : null,
|
|
3400
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2123
3401
|
StateBlock,
|
|
2124
3402
|
{
|
|
2125
3403
|
variant: "not-enough-data",
|
|
@@ -2132,8 +3410,8 @@ function PlaceholderPanel({
|
|
|
2132
3410
|
}
|
|
2133
3411
|
|
|
2134
3412
|
// src/SimpleDataTable.tsx
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
3413
|
+
var import_core54 = require("@mantine/core");
|
|
3414
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2137
3415
|
function SimpleDataTable({
|
|
2138
3416
|
columns,
|
|
2139
3417
|
rows,
|
|
@@ -2144,23 +3422,23 @@ function SimpleDataTable({
|
|
|
2144
3422
|
getRowKey
|
|
2145
3423
|
}) {
|
|
2146
3424
|
if (error) {
|
|
2147
|
-
return /* @__PURE__ */ (0,
|
|
3425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
2148
3426
|
}
|
|
2149
3427
|
if (loading) {
|
|
2150
|
-
return /* @__PURE__ */ (0,
|
|
3428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
2151
3429
|
}
|
|
2152
3430
|
if (!rows.length) {
|
|
2153
|
-
return /* @__PURE__ */ (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
2154
3432
|
}
|
|
2155
|
-
return /* @__PURE__ */ (0,
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2157
|
-
/* @__PURE__ */ (0,
|
|
3433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.ScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core54.Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
3435
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core54.Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
2158
3436
|
] }) });
|
|
2159
3437
|
}
|
|
2160
3438
|
|
|
2161
3439
|
// src/StatsSection.tsx
|
|
2162
|
-
var
|
|
2163
|
-
var
|
|
3440
|
+
var import_core55 = require("@mantine/core");
|
|
3441
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2164
3442
|
function StatsSection({
|
|
2165
3443
|
title,
|
|
2166
3444
|
loading = false,
|
|
@@ -2172,11 +3450,11 @@ function StatsSection({
|
|
|
2172
3450
|
}) {
|
|
2173
3451
|
let content = children;
|
|
2174
3452
|
if (error) {
|
|
2175
|
-
content = /* @__PURE__ */ (0,
|
|
3453
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
2176
3454
|
} else if (loading) {
|
|
2177
|
-
content = /* @__PURE__ */ (0,
|
|
3455
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
2178
3456
|
} else if (belowThreshold) {
|
|
2179
|
-
content = /* @__PURE__ */ (0,
|
|
3457
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2180
3458
|
StateBlock,
|
|
2181
3459
|
{
|
|
2182
3460
|
variant: "not-enough-data",
|
|
@@ -2186,10 +3464,10 @@ function StatsSection({
|
|
|
2186
3464
|
}
|
|
2187
3465
|
);
|
|
2188
3466
|
} else if (placeholder) {
|
|
2189
|
-
content = /* @__PURE__ */ (0,
|
|
3467
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
2190
3468
|
}
|
|
2191
|
-
return /* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
3469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_core55.Stack, { gap: "md", children: [
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_core55.Title, { order: 3, children: title }),
|
|
2193
3471
|
content
|
|
2194
3472
|
] });
|
|
2195
3473
|
}
|
|
@@ -3501,6 +4779,7 @@ function getGdsMessages(locale) {
|
|
|
3501
4779
|
AccentPanel,
|
|
3502
4780
|
AccessRecoveryPanel,
|
|
3503
4781
|
AccessSummary,
|
|
4782
|
+
ActionBar,
|
|
3504
4783
|
ArticleShell,
|
|
3505
4784
|
AuthShell,
|
|
3506
4785
|
BrowseSurface,
|
|
@@ -3510,6 +4789,8 @@ function getGdsMessages(locale) {
|
|
|
3510
4789
|
ConsumerSection,
|
|
3511
4790
|
CtaButtonGroup,
|
|
3512
4791
|
DataToolbar,
|
|
4792
|
+
DetailProfileShell,
|
|
4793
|
+
DiscoveryShell,
|
|
3513
4794
|
DocsCodeBlock,
|
|
3514
4795
|
DocsPageShell,
|
|
3515
4796
|
EditorialCard,
|
|
@@ -3517,31 +4798,47 @@ function getGdsMessages(locale) {
|
|
|
3517
4798
|
EmptyState,
|
|
3518
4799
|
FeatureBand,
|
|
3519
4800
|
FilterDrawer,
|
|
4801
|
+
FoodMenuSection,
|
|
3520
4802
|
FormField,
|
|
3521
4803
|
GameBoardTile,
|
|
3522
4804
|
GdsIcons,
|
|
3523
4805
|
GdsVocabulary,
|
|
4806
|
+
ListingCard,
|
|
4807
|
+
MapPanel,
|
|
3524
4808
|
MediaCard,
|
|
3525
4809
|
MediaField,
|
|
3526
4810
|
MetricCard,
|
|
3527
4811
|
PageHeader,
|
|
3528
4812
|
PlaceholderPanel,
|
|
4813
|
+
PlaybackSurface,
|
|
3529
4814
|
ProductCard,
|
|
3530
4815
|
ProgressCard,
|
|
3531
4816
|
PublicBrandFooter,
|
|
4817
|
+
PublicFlowShell,
|
|
4818
|
+
PublicFoodCard,
|
|
3532
4819
|
PublicNav,
|
|
3533
4820
|
PublicProductCard,
|
|
3534
4821
|
PublicShell,
|
|
3535
4822
|
PublicSiteFooter,
|
|
4823
|
+
ReferenceLinkGrid,
|
|
4824
|
+
ReferenceLocaleNotice,
|
|
4825
|
+
ReferenceSection,
|
|
4826
|
+
ReferenceThemeExplorer,
|
|
3536
4827
|
SectionPanel,
|
|
3537
4828
|
SemanticButton,
|
|
4829
|
+
ShareButtonGroup,
|
|
4830
|
+
SidebarNav,
|
|
4831
|
+
SidebarNavItem,
|
|
4832
|
+
SidebarNavSection,
|
|
3538
4833
|
SimpleDataTable,
|
|
4834
|
+
SocialAuthButtons,
|
|
3539
4835
|
StateBlock,
|
|
3540
4836
|
StatsSection,
|
|
3541
4837
|
StatusBadge,
|
|
3542
4838
|
ThemeToggle,
|
|
3543
4839
|
UploadDropzone,
|
|
3544
4840
|
ar,
|
|
4841
|
+
createGdsVocabularyPack,
|
|
3545
4842
|
de,
|
|
3546
4843
|
en,
|
|
3547
4844
|
es,
|
|
@@ -3553,6 +4850,8 @@ function getGdsMessages(locale) {
|
|
|
3553
4850
|
he,
|
|
3554
4851
|
hu,
|
|
3555
4852
|
it,
|
|
4853
|
+
mergeGdsVocabularyPacks,
|
|
3556
4854
|
resolveAccentPanelStyles,
|
|
4855
|
+
resolveSemanticActionConfig,
|
|
3557
4856
|
ru
|
|
3558
4857
|
});
|