@doneisbetter/gds-core 2.6.3 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QEPN7PSA.mjs → chunk-BAS4ZGKL.mjs} +1124 -415
- package/dist/{chunk-E3QXLNZO.mjs → chunk-EN3TN22M.mjs} +246 -38
- package/dist/client.d.mts +72 -10
- package/dist/client.d.ts +72 -10
- package/dist/client.js +1402 -468
- package/dist/client.mjs +36 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1402 -468
- package/dist/index.mjs +36 -2
- package/dist/server-BqFksoV3.d.mts +5540 -0
- package/dist/server-BqFksoV3.d.ts +5540 -0
- package/dist/server.d.mts +5 -6074
- package/dist/server.d.ts +5 -6074
- package/dist/server.js +1031 -310
- package/dist/server.mjs +23 -1
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -30,33 +30,42 @@ __export(server_exports, {
|
|
|
30
30
|
ConsumerSection: () => ConsumerSection,
|
|
31
31
|
CtaButtonGroup: () => CtaButtonGroup,
|
|
32
32
|
DataToolbar: () => DataToolbar,
|
|
33
|
+
DetailProfileShell: () => DetailProfileShell,
|
|
33
34
|
DocsPageShell: () => DocsPageShell,
|
|
34
35
|
EditorialCard: () => EditorialCard,
|
|
35
36
|
EditorialHero: () => EditorialHero,
|
|
36
37
|
EmptyState: () => EmptyState,
|
|
37
38
|
FeatureBand: () => FeatureBand,
|
|
38
39
|
FilterDrawer: () => FilterDrawer,
|
|
40
|
+
FoodMenuSection: () => FoodMenuSection,
|
|
39
41
|
FormField: () => FormField,
|
|
40
42
|
GdsIcons: () => GdsIcons,
|
|
41
43
|
GdsVocabulary: () => GdsVocabulary,
|
|
44
|
+
ListingCard: () => ListingCard,
|
|
45
|
+
MapPanel: () => MapPanel,
|
|
42
46
|
MediaCard: () => MediaCard,
|
|
43
47
|
MediaField: () => MediaField,
|
|
44
48
|
MetricCard: () => MetricCard,
|
|
45
49
|
PageHeader: () => PageHeader,
|
|
46
50
|
PlaceholderPanel: () => PlaceholderPanel,
|
|
51
|
+
PlaybackSurface: () => PlaybackSurface,
|
|
47
52
|
ProductCard: () => ProductCard,
|
|
48
53
|
ProgressCard: () => ProgressCard,
|
|
49
54
|
PublicBrandFooter: () => PublicBrandFooter,
|
|
55
|
+
PublicFlowShell: () => PublicFlowShell,
|
|
56
|
+
PublicFoodCard: () => PublicFoodCard,
|
|
50
57
|
PublicNav: () => PublicNav,
|
|
51
58
|
PublicProductCard: () => PublicProductCard,
|
|
52
59
|
PublicShell: () => PublicShell,
|
|
53
60
|
PublicSiteFooter: () => PublicSiteFooter,
|
|
54
61
|
SectionPanel: () => SectionPanel,
|
|
55
62
|
SimpleDataTable: () => SimpleDataTable,
|
|
63
|
+
SocialAuthButtons: () => SocialAuthButtons,
|
|
56
64
|
StateBlock: () => StateBlock,
|
|
57
65
|
StatsSection: () => StatsSection,
|
|
58
66
|
StatusBadge: () => StatusBadge,
|
|
59
67
|
ar: () => ar,
|
|
68
|
+
createGdsVocabularyPack: () => createGdsVocabularyPack,
|
|
60
69
|
de: () => de,
|
|
61
70
|
en: () => en,
|
|
62
71
|
es: () => es,
|
|
@@ -68,7 +77,9 @@ __export(server_exports, {
|
|
|
68
77
|
he: () => he,
|
|
69
78
|
hu: () => hu,
|
|
70
79
|
it: () => it,
|
|
80
|
+
mergeGdsVocabularyPacks: () => mergeGdsVocabularyPacks,
|
|
71
81
|
resolveAccentPanelStyles: () => resolveAccentPanelStyles,
|
|
82
|
+
resolveSemanticActionConfig: () => resolveSemanticActionConfig,
|
|
72
83
|
ru: () => ru
|
|
73
84
|
});
|
|
74
85
|
module.exports = __toCommonJS(server_exports);
|
|
@@ -183,7 +194,6 @@ var GdsIcons = {
|
|
|
183
194
|
|
|
184
195
|
// src/vocabulary.ts
|
|
185
196
|
var GdsVocabulary = {
|
|
186
|
-
// Base
|
|
187
197
|
settings: { id: "gds.action.settings", defaultMessage: "Settings", icon: GdsIcons.Settings, feedback: { icon: GdsIcons.Settings, color: "teal", messageId: "gds.feedback.saved" } },
|
|
188
198
|
analytics: { id: "gds.action.analytics", defaultMessage: "Analytics", icon: GdsIcons.Analytics, feedback: { icon: GdsIcons.Analytics, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
189
199
|
dashboard: { id: "gds.action.dashboard", defaultMessage: "Dashboard", icon: GdsIcons.Dashboard, feedback: { icon: GdsIcons.Dashboard, color: "teal", messageId: "gds.feedback.loaded" } },
|
|
@@ -199,14 +209,12 @@ var GdsVocabulary = {
|
|
|
199
209
|
close: { id: "gds.action.close", defaultMessage: "Close", icon: GdsIcons.Close, feedback: { icon: GdsIcons.Close, color: "gray", messageId: "gds.feedback.closed" } },
|
|
200
210
|
language: { id: "gds.action.language", defaultMessage: "Language", icon: GdsIcons.Language, feedback: { icon: GdsIcons.Language, color: "teal", messageId: "gds.feedback.changed" } },
|
|
201
211
|
theme: { id: "gds.action.theme", defaultMessage: "Theme", icon: GdsIcons.Theme, feedback: { icon: GdsIcons.Theme, color: "teal", messageId: "gds.feedback.changed" } },
|
|
202
|
-
// Navigation
|
|
203
212
|
home: { id: "gds.action.home", defaultMessage: "Home", icon: GdsIcons.Home, feedback: { icon: GdsIcons.Home, color: "teal", messageId: "gds.feedback.opened" } },
|
|
204
213
|
inbox: { id: "gds.action.inbox", defaultMessage: "Inbox", icon: GdsIcons.Inbox, feedback: { icon: GdsIcons.Inbox, color: "teal", messageId: "gds.feedback.opened" } },
|
|
205
214
|
calendar: { id: "gds.action.calendar", defaultMessage: "Calendar", icon: GdsIcons.Calendar, feedback: { icon: GdsIcons.Calendar, color: "teal", messageId: "gds.feedback.opened" } },
|
|
206
215
|
gallery: { id: "gds.action.gallery", defaultMessage: "Gallery", icon: GdsIcons.Gallery, feedback: { icon: GdsIcons.Gallery, color: "teal", messageId: "gds.feedback.opened" } },
|
|
207
216
|
history: { id: "gds.action.history", defaultMessage: "History", icon: GdsIcons.History, feedback: { icon: GdsIcons.History, color: "teal", messageId: "gds.feedback.opened" } },
|
|
208
217
|
profile: { id: "gds.action.profile", defaultMessage: "Profile", icon: GdsIcons.Profile, feedback: { icon: GdsIcons.Profile, color: "teal", messageId: "gds.feedback.opened" } },
|
|
209
|
-
// Actions
|
|
210
218
|
send: { id: "gds.action.send", defaultMessage: "Send", icon: GdsIcons.Send, feedback: { icon: GdsIcons.Send, color: "blue", messageId: "gds.feedback.sent" } },
|
|
211
219
|
reply: { id: "gds.action.reply", defaultMessage: "Reply", icon: GdsIcons.Reply, feedback: { icon: GdsIcons.Reply, color: "blue", messageId: "gds.feedback.replied" } },
|
|
212
220
|
forward: { id: "gds.action.forward", defaultMessage: "Forward", icon: GdsIcons.Forward, feedback: { icon: GdsIcons.Forward, color: "blue", messageId: "gds.feedback.forwarded" } },
|
|
@@ -220,12 +228,10 @@ var GdsVocabulary = {
|
|
|
220
228
|
uncheck: { id: "gds.action.uncheck", defaultMessage: "Uncheck", icon: GdsIcons.Uncheck, feedback: { icon: GdsIcons.Uncheck, color: "red", messageId: "gds.feedback.unchecked" } },
|
|
221
229
|
complete: { id: "gds.action.complete", defaultMessage: "Complete", icon: GdsIcons.Complete, feedback: { icon: GdsIcons.Complete, color: "teal", messageId: "gds.feedback.completed" } },
|
|
222
230
|
clear: { id: "gds.action.clear", defaultMessage: "Clear", icon: GdsIcons.Clear, feedback: { icon: GdsIcons.Clear, color: "red", messageId: "gds.feedback.cleared" } },
|
|
223
|
-
// Media (camera project)
|
|
224
231
|
capture: { id: "gds.action.capture", defaultMessage: "Capture", icon: GdsIcons.Capture, feedback: { icon: GdsIcons.Capture, color: "teal", messageId: "gds.feedback.captured" } },
|
|
225
232
|
record: { id: "gds.action.record", defaultMessage: "Record", icon: GdsIcons.Record, feedback: { icon: GdsIcons.Record, color: "teal", messageId: "gds.feedback.recorded" } },
|
|
226
233
|
flip: { id: "gds.action.flip", defaultMessage: "Flip", icon: GdsIcons.Flip, feedback: { icon: GdsIcons.Flip, color: "teal", messageId: "gds.feedback.flipped" } },
|
|
227
234
|
flash: { id: "gds.action.flash", defaultMessage: "Flash", icon: GdsIcons.Flash, feedback: { icon: GdsIcons.Flash, color: "teal", messageId: "gds.feedback.flashed" } },
|
|
228
|
-
// Domain specific (amanoba, classscout, kidex, habigoal)
|
|
229
235
|
course: { id: "gds.action.course", defaultMessage: "Course", icon: GdsIcons.Course, feedback: { icon: GdsIcons.Course, color: "teal", messageId: "gds.feedback.done" } },
|
|
230
236
|
lesson: { id: "gds.action.lesson", defaultMessage: "Lesson", icon: GdsIcons.Lesson, feedback: { icon: GdsIcons.Lesson, color: "teal", messageId: "gds.feedback.done" } },
|
|
231
237
|
certificate: { id: "gds.action.certificate", defaultMessage: "Certificate", icon: GdsIcons.Certificate, feedback: { icon: GdsIcons.Certificate, color: "teal", messageId: "gds.feedback.done" } },
|
|
@@ -238,7 +244,6 @@ var GdsVocabulary = {
|
|
|
238
244
|
goal: { id: "gds.action.goal", defaultMessage: "Goal", icon: GdsIcons.Goal, feedback: { icon: GdsIcons.Goal, color: "teal", messageId: "gds.feedback.done" } },
|
|
239
245
|
streak: { id: "gds.action.streak", defaultMessage: "Streak", icon: GdsIcons.Streak, feedback: { icon: GdsIcons.Streak, color: "teal", messageId: "gds.feedback.done" } },
|
|
240
246
|
reward: { id: "gds.action.reward", defaultMessage: "Reward", icon: GdsIcons.Reward, feedback: { icon: GdsIcons.Reward, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
241
|
-
// Codebase analysis additions
|
|
242
247
|
trophy: { id: "gds.action.trophy", defaultMessage: "Trophy", icon: GdsIcons.Trophy, feedback: { icon: GdsIcons.Trophy, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
243
248
|
crown: { id: "gds.action.crown", defaultMessage: "Crown", icon: GdsIcons.Crown, feedback: { icon: GdsIcons.Crown, color: "yellow", messageId: "gds.feedback.rewarded" } },
|
|
244
249
|
pause: { id: "gds.action.pause", defaultMessage: "Pause", icon: GdsIcons.Pause, feedback: { icon: GdsIcons.Pause, color: "teal", messageId: "gds.feedback.paused" } },
|
|
@@ -258,7 +263,6 @@ var GdsVocabulary = {
|
|
|
258
263
|
help: { id: "gds.action.help", defaultMessage: "Help", icon: GdsIcons.Help, feedback: { icon: GdsIcons.Help, color: "teal", messageId: "gds.feedback.done" } },
|
|
259
264
|
filter: { id: "gds.action.filter", defaultMessage: "Filter", icon: GdsIcons.Filter, feedback: { icon: GdsIcons.Filter, color: "teal", messageId: "gds.feedback.filtered" } },
|
|
260
265
|
sort: { id: "gds.action.sort", defaultMessage: "Sort", icon: GdsIcons.Sort, feedback: { icon: GdsIcons.Sort, color: "teal", messageId: "gds.feedback.sorted" } },
|
|
261
|
-
// Audit-driven additions
|
|
262
266
|
export: { id: "gds.action.export", defaultMessage: "Export", icon: GdsIcons.Export, feedback: { icon: GdsIcons.Export, color: "teal", messageId: "gds.feedback.exported" } },
|
|
263
267
|
import: { id: "gds.action.import", defaultMessage: "Import", icon: GdsIcons.Import, feedback: { icon: GdsIcons.Import, color: "teal", messageId: "gds.feedback.imported" } },
|
|
264
268
|
preview: { id: "gds.action.preview", defaultMessage: "Preview", icon: GdsIcons.Preview, feedback: { icon: GdsIcons.Preview, color: "teal", messageId: "gds.feedback.previewed" } },
|
|
@@ -276,11 +280,45 @@ var GdsVocabulary = {
|
|
|
276
280
|
refer: { id: "gds.action.refer", defaultMessage: "Refer", icon: GdsIcons.Refer, feedback: { icon: GdsIcons.Refer, color: "teal", messageId: "gds.feedback.referred" } },
|
|
277
281
|
evidence: { id: "gds.action.evidence", defaultMessage: "Evidence", icon: GdsIcons.Evidence, feedback: { icon: GdsIcons.Evidence, color: "teal", messageId: "gds.feedback.added" } }
|
|
278
282
|
};
|
|
279
|
-
function
|
|
280
|
-
return
|
|
283
|
+
function createGdsVocabularyPack(namespace, actions) {
|
|
284
|
+
return {
|
|
285
|
+
namespace,
|
|
286
|
+
actions: Object.fromEntries(
|
|
287
|
+
Object.entries(actions).map(([key, definition]) => [
|
|
288
|
+
`${namespace}:${key}`,
|
|
289
|
+
{
|
|
290
|
+
...definition,
|
|
291
|
+
id: `gds.action.${namespace}.${key}`
|
|
292
|
+
}
|
|
293
|
+
])
|
|
294
|
+
)
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function mergeGdsVocabularyPacks(packs = []) {
|
|
298
|
+
return packs.reduce((acc, pack) => {
|
|
299
|
+
for (const [key, definition] of Object.entries(pack.actions)) {
|
|
300
|
+
acc[key] = definition;
|
|
301
|
+
}
|
|
302
|
+
return acc;
|
|
303
|
+
}, {});
|
|
304
|
+
}
|
|
305
|
+
function resolveSemanticActionConfig(action, packs = []) {
|
|
306
|
+
const baseConfig = GdsVocabulary[action];
|
|
307
|
+
if (baseConfig) {
|
|
308
|
+
return baseConfig;
|
|
309
|
+
}
|
|
310
|
+
const merged = mergeGdsVocabularyPacks(packs);
|
|
311
|
+
const packConfig = merged[action];
|
|
312
|
+
if (packConfig) {
|
|
313
|
+
return packConfig;
|
|
314
|
+
}
|
|
315
|
+
throw new Error(`Unknown semantic action: ${action}`);
|
|
281
316
|
}
|
|
282
|
-
function
|
|
283
|
-
|
|
317
|
+
function getSemanticActionConfig(action, packs = []) {
|
|
318
|
+
return resolveSemanticActionConfig(action, packs);
|
|
319
|
+
}
|
|
320
|
+
function getSemanticActionLabel(action, translate, packs = []) {
|
|
321
|
+
const config = resolveSemanticActionConfig(action, packs);
|
|
284
322
|
return translate ? translate(config.id, config.defaultMessage) : config.defaultMessage;
|
|
285
323
|
}
|
|
286
324
|
|
|
@@ -727,12 +765,278 @@ function PublicProductCard({
|
|
|
727
765
|
] }) });
|
|
728
766
|
}
|
|
729
767
|
|
|
730
|
-
// src/
|
|
768
|
+
// src/PublicFoodCard.tsx
|
|
769
|
+
var import_react2 = require("react");
|
|
770
|
+
var import_core11 = require("@mantine/core");
|
|
771
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
772
|
+
var ratioMap = {
|
|
773
|
+
square: 1,
|
|
774
|
+
dish: 4 / 3,
|
|
775
|
+
landscape: 16 / 9
|
|
776
|
+
};
|
|
777
|
+
var stateConfig2 = {
|
|
778
|
+
available: { label: "Available", color: "teal" },
|
|
779
|
+
preorder: { label: "Preorder", color: "violet" },
|
|
780
|
+
limited: { label: "Limited batch", color: "yellow" },
|
|
781
|
+
"sold-out": { label: "Sold out", color: "red" },
|
|
782
|
+
"coming-soon": { label: "Coming soon", color: "gray" }
|
|
783
|
+
};
|
|
784
|
+
var markerToneMap = {
|
|
785
|
+
default: "gray",
|
|
786
|
+
positive: "teal",
|
|
787
|
+
warning: "orange",
|
|
788
|
+
muted: "dark"
|
|
789
|
+
};
|
|
790
|
+
function enhanceAction2(action, disabled) {
|
|
791
|
+
if (!(0, import_react2.isValidElement)(action)) {
|
|
792
|
+
return action;
|
|
793
|
+
}
|
|
794
|
+
return (0, import_react2.cloneElement)(action, {
|
|
795
|
+
disabled: disabled || Boolean(action.props.disabled),
|
|
796
|
+
"aria-disabled": disabled || void 0
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
function FoodImageFallback({ mediaRatio }) {
|
|
800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.ThemeIcon, { size: "100%", radius: "md", variant: "light", color: "gray", "aria-label": "No food image available", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GdsIcons.Gallery, { size: "2rem" }) }) });
|
|
801
|
+
}
|
|
802
|
+
function LoadingFoodCard({ mediaRatio }) {
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "md", children: [
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.AspectRatio, { ratio: ratioMap[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { radius: "md" }) }),
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "xs", children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 20, radius: "sm", width: "72%" }),
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 14, radius: "sm", width: "96%" }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 14, radius: "sm", width: "78%" })
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "center", children: [
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 18, radius: "sm", width: 96 }),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Skeleton, { height: 36, radius: "md", width: 112 })
|
|
813
|
+
] })
|
|
814
|
+
] }) });
|
|
815
|
+
}
|
|
816
|
+
function PublicFoodCard({
|
|
817
|
+
title,
|
|
818
|
+
description,
|
|
819
|
+
image,
|
|
820
|
+
price,
|
|
821
|
+
priceNote,
|
|
822
|
+
state,
|
|
823
|
+
helperText,
|
|
824
|
+
pickupNote,
|
|
825
|
+
freshnessNote,
|
|
826
|
+
markers = [],
|
|
827
|
+
metadata = [],
|
|
828
|
+
primaryAction,
|
|
829
|
+
secondaryAction,
|
|
830
|
+
quantityHint,
|
|
831
|
+
mediaRatio = "dish",
|
|
832
|
+
loading = false,
|
|
833
|
+
disabled = false
|
|
834
|
+
}) {
|
|
835
|
+
if (loading) {
|
|
836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoadingFoodCard, { mediaRatio });
|
|
837
|
+
}
|
|
838
|
+
const stateBadge = stateConfig2[state];
|
|
839
|
+
const isActionDisabled = disabled || state === "sold-out" || state === "coming-soon";
|
|
840
|
+
const resolvedPrimaryAction = enhanceAction2(primaryAction, isActionDisabled);
|
|
841
|
+
const resolvedSecondaryAction = enhanceAction2(secondaryAction, disabled);
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: "md", children: [
|
|
843
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FoodImageFallback, { mediaRatio }),
|
|
844
|
+
markers.length > 0 || quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "center", wrap: "wrap", gap: "xs", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { gap: "xs", wrap: "wrap", children: markers.map((marker) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Badge, { variant: "light", color: markerToneMap[marker.tone ?? "default"], children: marker.label }, marker.id)) }),
|
|
846
|
+
quantityHint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", fw: 600, c: "dimmed", children: quantityHint }) : null
|
|
847
|
+
] }) : null,
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Title, { order: 4, lineClamp: 2, children: title }),
|
|
851
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
854
|
+
] }),
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-end", gap: "sm", wrap: "nowrap", children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
857
|
+
price ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { fw: 800, size: "lg", children: price }) : null,
|
|
858
|
+
priceNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "xs", c: "dimmed", children: priceNote }) : null,
|
|
859
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
860
|
+
] }),
|
|
861
|
+
resolvedPrimaryAction
|
|
862
|
+
] }),
|
|
863
|
+
pickupNote || freshnessNote || metadata.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Stack, { gap: 6, children: [
|
|
864
|
+
pickupNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: "Pickup" }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", fw: 500, ta: "right", children: pickupNote })
|
|
867
|
+
] }) : null,
|
|
868
|
+
freshnessNote ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: "Freshness" }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", fw: 500, ta: "right", children: freshnessNote })
|
|
871
|
+
] }) : null,
|
|
872
|
+
metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_core11.Group, { gap: "xs", wrap: "nowrap", children: [
|
|
873
|
+
item.icon,
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
875
|
+
] }) }, item.id))
|
|
876
|
+
] }) : null,
|
|
877
|
+
resolvedSecondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core11.Group, { justify: "flex-end", children: resolvedSecondaryAction }) : null
|
|
878
|
+
] }) });
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
// src/FoodMenuSection.tsx
|
|
882
|
+
var import_core12 = require("@mantine/core");
|
|
883
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
884
|
+
function FoodMenuSection({
|
|
885
|
+
title,
|
|
886
|
+
description,
|
|
887
|
+
eyebrow,
|
|
888
|
+
categories,
|
|
889
|
+
sectionNote,
|
|
890
|
+
action,
|
|
891
|
+
emptyState,
|
|
892
|
+
columns = 3,
|
|
893
|
+
showEmptyCategories = false
|
|
894
|
+
}) {
|
|
895
|
+
const normalizedCategories = (categories ?? []).filter(Boolean);
|
|
896
|
+
const visibleCategories = showEmptyCategories ? normalizedCategories : normalizedCategories.filter((category) => category.items.length > 0);
|
|
897
|
+
if (!visibleCategories.length) {
|
|
898
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
899
|
+
EmptyState,
|
|
900
|
+
{
|
|
901
|
+
title: "No active menu available",
|
|
902
|
+
description: "Publish grouped menu categories here when the current weekly or seasonal menu is ready."
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Box, { component: "section", "aria-label": typeof title === "string" ? title : "Food menu section", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: "xl", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: 4, children: [
|
|
909
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Title, { order: 2, children: title }),
|
|
911
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", maw: 760, children: description }) : null,
|
|
912
|
+
sectionNote ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: sectionNote }) : null
|
|
913
|
+
] }),
|
|
914
|
+
action
|
|
915
|
+
] }),
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Stack, { gap: "xl", children: visibleCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: "md", children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Stack, { gap: 4, children: [
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Title, { order: 3, children: category.title }),
|
|
919
|
+
category.description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: category.description }) : null,
|
|
920
|
+
category.helperNote ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: category.helperNote }) : null
|
|
921
|
+
] }),
|
|
922
|
+
category.items.length ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: category.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PublicFoodCard, { ...item }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
923
|
+
EmptyState,
|
|
924
|
+
{
|
|
925
|
+
title: "No items in this category",
|
|
926
|
+
description: "This category is defined, but it does not currently have any visible dishes or bundles."
|
|
927
|
+
}
|
|
928
|
+
)
|
|
929
|
+
] }, category.id)) })
|
|
930
|
+
] }) });
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// src/ListingCard.tsx
|
|
731
934
|
var import_core13 = require("@mantine/core");
|
|
935
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
936
|
+
var ratioMap2 = {
|
|
937
|
+
"1:1": 1,
|
|
938
|
+
"4:3": 4 / 3,
|
|
939
|
+
"16:9": 16 / 9
|
|
940
|
+
};
|
|
941
|
+
var toneColorMap = {
|
|
942
|
+
default: void 0,
|
|
943
|
+
positive: "teal",
|
|
944
|
+
warning: "orange",
|
|
945
|
+
muted: "gray"
|
|
946
|
+
};
|
|
947
|
+
function ListingImageFallback({ mediaRatio }) {
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.AspectRatio, { ratio: ratioMap2[mediaRatio], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
949
|
+
import_core13.ThemeIcon,
|
|
950
|
+
{
|
|
951
|
+
size: "100%",
|
|
952
|
+
radius: "md",
|
|
953
|
+
variant: "light",
|
|
954
|
+
color: "gray",
|
|
955
|
+
"aria-label": "No listing image available",
|
|
956
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(GdsIcons.Gallery, { size: "2rem" })
|
|
957
|
+
}
|
|
958
|
+
) });
|
|
959
|
+
}
|
|
960
|
+
function ListingAffordance({ affordance }) {
|
|
961
|
+
const config = GdsVocabulary[affordance.action];
|
|
962
|
+
const Icon = config.icon;
|
|
963
|
+
const label = affordance.ariaLabel ?? getSemanticActionLabel(affordance.action);
|
|
964
|
+
if (affordance.href) {
|
|
965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
966
|
+
import_core13.ActionIcon,
|
|
967
|
+
{
|
|
968
|
+
component: "a",
|
|
969
|
+
href: affordance.href,
|
|
970
|
+
variant: "subtle",
|
|
971
|
+
size: "lg",
|
|
972
|
+
"aria-label": label,
|
|
973
|
+
disabled: affordance.disabled,
|
|
974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
975
|
+
}
|
|
976
|
+
);
|
|
977
|
+
}
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
979
|
+
import_core13.ActionIcon,
|
|
980
|
+
{
|
|
981
|
+
variant: "subtle",
|
|
982
|
+
size: "lg",
|
|
983
|
+
"aria-label": label,
|
|
984
|
+
onClick: affordance.onClick,
|
|
985
|
+
disabled: affordance.disabled,
|
|
986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
987
|
+
}
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
function ListingCard({
|
|
991
|
+
title,
|
|
992
|
+
href,
|
|
993
|
+
description,
|
|
994
|
+
image,
|
|
995
|
+
mediaRatio = "4:3",
|
|
996
|
+
metadata = [],
|
|
997
|
+
featured = false,
|
|
998
|
+
sponsoredDisclosure,
|
|
999
|
+
price,
|
|
1000
|
+
primaryAction,
|
|
1001
|
+
saveAction,
|
|
1002
|
+
shareAction,
|
|
1003
|
+
compact = false
|
|
1004
|
+
}) {
|
|
1005
|
+
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
1006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: compact ? "sm" : "md", children: [
|
|
1007
|
+
image ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingImageFallback, { mediaRatio }),
|
|
1008
|
+
featured || sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
1009
|
+
featured ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Badge, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", {}),
|
|
1010
|
+
sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
1011
|
+
] }) : null,
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: 4, children: [
|
|
1013
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Title, { order: compact ? 5 : 4, lineClamp: 2, children: titleContent }),
|
|
1014
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1015
|
+
] }),
|
|
1016
|
+
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Stack, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { gap: "xs", wrap: "nowrap", style: { minWidth: 0, flex: 1 }, children: [
|
|
1018
|
+
item.icon,
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", c: item.tone ? toneColorMap[item.tone] : "dimmed", lineClamp: 1, children: item.label })
|
|
1020
|
+
] }),
|
|
1021
|
+
item.value ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { size: "sm", fw: 500, ta: "right", children: item.value }) : null
|
|
1022
|
+
] }, item.id)) }) : null,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { justify: "space-between", align: "center", gap: "sm", wrap: "wrap", children: [
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: price ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Text, { fw: 700, size: compact ? "md" : "lg", children: price }) : null }),
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Group, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1026
|
+
saveAction ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingAffordance, { affordance: saveAction }) : null,
|
|
1027
|
+
shareAction ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListingAffordance, { affordance: shareAction }) : null,
|
|
1028
|
+
primaryAction
|
|
1029
|
+
] })
|
|
1030
|
+
] })
|
|
1031
|
+
] }) });
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
// src/BrowseSurface.tsx
|
|
1035
|
+
var import_core16 = require("@mantine/core");
|
|
732
1036
|
|
|
733
1037
|
// src/DataToolbar.tsx
|
|
734
|
-
var
|
|
735
|
-
var
|
|
1038
|
+
var import_core14 = require("@mantine/core");
|
|
1039
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
736
1040
|
function DataToolbar({
|
|
737
1041
|
searchSlot,
|
|
738
1042
|
filterSlot,
|
|
@@ -741,20 +1045,20 @@ function DataToolbar({
|
|
|
741
1045
|
createAction,
|
|
742
1046
|
activeFilters = []
|
|
743
1047
|
}) {
|
|
744
|
-
return /* @__PURE__ */ (0,
|
|
745
|
-
/* @__PURE__ */ (0,
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Stack, { gap: "sm", children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { flex: 1, align: "flex-start", gap: "sm", children: [
|
|
747
1051
|
searchSlot,
|
|
748
1052
|
filterSlot,
|
|
749
1053
|
sortSlot
|
|
750
1054
|
] }),
|
|
751
|
-
/* @__PURE__ */ (0,
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Group, { gap: "sm", children: [
|
|
752
1056
|
resetAction,
|
|
753
1057
|
createAction
|
|
754
1058
|
] })
|
|
755
1059
|
] }),
|
|
756
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
757
|
-
|
|
1060
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Group, { gap: "xs", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1061
|
+
import_core14.Badge,
|
|
758
1062
|
{
|
|
759
1063
|
variant: "light",
|
|
760
1064
|
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
@@ -768,17 +1072,17 @@ function DataToolbar({
|
|
|
768
1072
|
}
|
|
769
1073
|
|
|
770
1074
|
// src/StateBlock.tsx
|
|
771
|
-
var
|
|
772
|
-
var
|
|
1075
|
+
var import_core15 = require("@mantine/core");
|
|
1076
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
773
1077
|
var variantConfig = {
|
|
774
|
-
loading: { color: "violet", icon: /* @__PURE__ */ (0,
|
|
775
|
-
empty: { color: "gray", icon: /* @__PURE__ */ (0,
|
|
776
|
-
error: { color: "red", icon: /* @__PURE__ */ (0,
|
|
777
|
-
permission: { color: "orange", icon: /* @__PURE__ */ (0,
|
|
778
|
-
disabled: { color: "gray", icon: /* @__PURE__ */ (0,
|
|
779
|
-
success: { color: "teal", icon: /* @__PURE__ */ (0,
|
|
780
|
-
info: { color: "blue", icon: /* @__PURE__ */ (0,
|
|
781
|
-
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0,
|
|
1078
|
+
loading: { color: "violet", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Loader, { size: "sm" }) },
|
|
1079
|
+
empty: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Inbox, { size: "1.1rem" }) },
|
|
1080
|
+
error: { color: "red", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Danger, { size: "1.1rem" }) },
|
|
1081
|
+
permission: { color: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Verify, { size: "1.1rem" }) },
|
|
1082
|
+
disabled: { color: "gray", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Toggle, { size: "1.1rem" }) },
|
|
1083
|
+
success: { color: "teal", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Success, { size: "1.1rem" }) },
|
|
1084
|
+
info: { color: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Info, { size: "1.1rem" }) },
|
|
1085
|
+
"not-enough-data": { color: "yellow", icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GdsIcons.Analytics, { size: "1.1rem" }) }
|
|
782
1086
|
};
|
|
783
1087
|
function StateBlock({
|
|
784
1088
|
variant,
|
|
@@ -789,8 +1093,8 @@ function StateBlock({
|
|
|
789
1093
|
compact = false
|
|
790
1094
|
}) {
|
|
791
1095
|
const config = variantConfig[variant];
|
|
792
|
-
return /* @__PURE__ */ (0,
|
|
793
|
-
|
|
1096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1097
|
+
import_core15.Stack,
|
|
794
1098
|
{
|
|
795
1099
|
align: compact ? "flex-start" : "center",
|
|
796
1100
|
justify: "center",
|
|
@@ -798,10 +1102,10 @@ function StateBlock({
|
|
|
798
1102
|
py: compact ? "md" : "xl",
|
|
799
1103
|
ta: compact ? "left" : "center",
|
|
800
1104
|
children: [
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
804
|
-
description ? /* @__PURE__ */ (0,
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.ThemeIcon, { variant: "light", color: config.color, size: compact ? "lg" : "xl", radius: "xl", children: icon ?? config.icon }),
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_core15.Stack, { gap: 6, align: compact ? "flex-start" : "center", children: [
|
|
1107
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Title, { order: compact ? 4 : 3, children: title }),
|
|
1108
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core15.Text, { c: "dimmed", maw: compact ? void 0 : 480, children: description }) : null
|
|
805
1109
|
] }),
|
|
806
1110
|
action
|
|
807
1111
|
]
|
|
@@ -810,7 +1114,7 @@ function StateBlock({
|
|
|
810
1114
|
}
|
|
811
1115
|
|
|
812
1116
|
// src/BrowseSurface.tsx
|
|
813
|
-
var
|
|
1117
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
814
1118
|
function BrowseSurface({
|
|
815
1119
|
eyebrow,
|
|
816
1120
|
title,
|
|
@@ -844,22 +1148,22 @@ function BrowseSurface({
|
|
|
844
1148
|
}));
|
|
845
1149
|
let body = content;
|
|
846
1150
|
if (loading) {
|
|
847
|
-
body = /* @__PURE__ */ (0,
|
|
1151
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "loading", title: loadingTitle, description: loadingDescription, compact: true });
|
|
848
1152
|
} else if (error) {
|
|
849
|
-
body = /* @__PURE__ */ (0,
|
|
1153
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "error", title: errorTitle, description: error, action: errorAction ?? emptyAction, compact: true });
|
|
850
1154
|
} else if (empty) {
|
|
851
|
-
body = /* @__PURE__ */ (0,
|
|
1155
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, action: emptyAction, compact: true });
|
|
852
1156
|
}
|
|
853
|
-
return /* @__PURE__ */ (0,
|
|
854
|
-
/* @__PURE__ */ (0,
|
|
855
|
-
/* @__PURE__ */ (0,
|
|
856
|
-
/* @__PURE__ */ (0,
|
|
857
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
859
|
-
description ? /* @__PURE__ */ (0,
|
|
1157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "lg", children: [
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Paper, { withBorder: true, radius: "xl", p: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "lg", children: [
|
|
1159
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Group, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", maw: 760, children: [
|
|
1161
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "xs", fw: 700, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.18em" }, children: eyebrow }) : null,
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Title, { order: 1, children: title }),
|
|
1163
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "lg", c: "dimmed", children: description }) : null
|
|
860
1164
|
] }),
|
|
861
|
-
/* @__PURE__ */ (0,
|
|
862
|
-
typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { align: "flex-end", gap: "xs", children: [
|
|
1166
|
+
typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Badge, { size: "lg", radius: "xl", variant: "light", color: "violet", children: [
|
|
863
1167
|
resultCount,
|
|
864
1168
|
" ",
|
|
865
1169
|
resultLabel
|
|
@@ -867,10 +1171,10 @@ function BrowseSurface({
|
|
|
867
1171
|
primaryControls
|
|
868
1172
|
] })
|
|
869
1173
|
] }),
|
|
870
|
-
scopeOptions.length ? /* @__PURE__ */ (0,
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
873
|
-
|
|
1174
|
+
scopeOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", children: [
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: scopeLabel }),
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Group, { gap: "xs", wrap: "wrap", children: scopeOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1177
|
+
import_core16.Button,
|
|
874
1178
|
{
|
|
875
1179
|
variant: option.active ? "filled" : "default",
|
|
876
1180
|
color: option.active ? "violet" : "gray",
|
|
@@ -882,30 +1186,30 @@ function BrowseSurface({
|
|
|
882
1186
|
option.id
|
|
883
1187
|
)) })
|
|
884
1188
|
] }) : null,
|
|
885
|
-
locationControls ? /* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
locationControls ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", children: [
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Location" }),
|
|
887
1191
|
locationControls
|
|
888
1192
|
] }) : null,
|
|
889
|
-
toolbar || sortControl ? /* @__PURE__ */ (0,
|
|
890
|
-
toolbar ? /* @__PURE__ */ (0,
|
|
1193
|
+
toolbar || sortControl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.SimpleGrid, { cols: { base: 1, lg: sortControl ? 2 : 1 }, spacing: "md", children: [
|
|
1194
|
+
toolbar ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
891
1195
|
DataToolbar,
|
|
892
1196
|
{
|
|
893
1197
|
...toolbar,
|
|
894
1198
|
activeFilters: toolbarFilters.length ? toolbarFilters : toolbar.fallbackActiveFilters
|
|
895
1199
|
}
|
|
896
|
-
) : /* @__PURE__ */ (0,
|
|
897
|
-
sortControl ? /* @__PURE__ */ (0,
|
|
898
|
-
/* @__PURE__ */ (0,
|
|
1200
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Box, {}),
|
|
1201
|
+
sortControl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { gap: "xs", align: "stretch", children: [
|
|
1202
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Sort" }),
|
|
899
1203
|
sortControl
|
|
900
1204
|
] }) : null
|
|
901
1205
|
] }) : null,
|
|
902
|
-
mobileFilters ? /* @__PURE__ */ (0,
|
|
903
|
-
/* @__PURE__ */ (0,
|
|
1206
|
+
mobileFilters ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core16.Stack, { hiddenFrom: "lg", gap: "xs", children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Text, { size: "sm", fw: 600, c: "dimmed", children: "Filters" }),
|
|
904
1208
|
mobileFilters
|
|
905
1209
|
] }) : null,
|
|
906
|
-
filterDrawer ? /* @__PURE__ */ (0,
|
|
907
|
-
activeFilters.length ? /* @__PURE__ */ (0,
|
|
908
|
-
|
|
1210
|
+
filterDrawer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Box, { hiddenFrom: "lg", children: filterDrawer }) : null,
|
|
1211
|
+
activeFilters.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core16.Group, { gap: "xs", wrap: "wrap", children: activeFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1212
|
+
import_core16.Badge,
|
|
909
1213
|
{
|
|
910
1214
|
variant: "light",
|
|
911
1215
|
color: "violet",
|
|
@@ -922,8 +1226,8 @@ function BrowseSurface({
|
|
|
922
1226
|
}
|
|
923
1227
|
|
|
924
1228
|
// src/AccentPanel.tsx
|
|
925
|
-
var
|
|
926
|
-
var
|
|
1229
|
+
var import_core17 = require("@mantine/core");
|
|
1230
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
927
1231
|
var toneStyles = {
|
|
928
1232
|
gray: {
|
|
929
1233
|
bg: "light-dark(var(--mantine-color-gray-0), color-mix(in srgb, var(--mantine-color-gray-7) 88%, black))",
|
|
@@ -979,29 +1283,56 @@ function AccentPanel({
|
|
|
979
1283
|
children
|
|
980
1284
|
}) {
|
|
981
1285
|
const styles = resolveAccentPanelStyles(tone, variant);
|
|
982
|
-
return /* @__PURE__ */ (0,
|
|
983
|
-
title || badge ? /* @__PURE__ */ (0,
|
|
984
|
-
title ? /* @__PURE__ */ (0,
|
|
985
|
-
badge ? typeof badge === "string" ? /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Paper, { withBorder: true, radius: "lg", p: "lg", style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Stack, { gap: "sm", children: [
|
|
1287
|
+
title || badge ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core17.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "wrap", children: [
|
|
1288
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Title, { order: 4, c: "inherit", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Box, {}),
|
|
1289
|
+
badge ? typeof badge === "string" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Badge, { color: tone === "amber" ? "yellow" : tone, variant: "filled", children: badge }) : badge : null
|
|
986
1290
|
] }) : null,
|
|
987
|
-
typeof children === "string" ? /* @__PURE__ */ (0,
|
|
1291
|
+
typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Text, { c: "inherit", children }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core17.Box, { c: "inherit", children })
|
|
1292
|
+
] }) });
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// src/DetailProfileShell.tsx
|
|
1296
|
+
var import_core18 = require("@mantine/core");
|
|
1297
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1298
|
+
function DetailProfileShell({
|
|
1299
|
+
mode = "page",
|
|
1300
|
+
hero,
|
|
1301
|
+
actions,
|
|
1302
|
+
sections,
|
|
1303
|
+
related,
|
|
1304
|
+
padding = "lg",
|
|
1305
|
+
showDividers = true
|
|
1306
|
+
}) {
|
|
1307
|
+
const content = sections.filter(Boolean);
|
|
1308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Paper, { withBorder: mode === "drawer", radius: mode === "drawer" ? "xl" : "md", p: padding, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core18.Stack, { gap: "lg", children: [
|
|
1309
|
+
hero,
|
|
1310
|
+
actions,
|
|
1311
|
+
content.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core18.Stack, { gap: "lg", children: [
|
|
1312
|
+
index > 0 && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Divider, {}) : null,
|
|
1313
|
+
section
|
|
1314
|
+
] }, index)),
|
|
1315
|
+
related ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1316
|
+
content.length && showDividers ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core18.Divider, {}) : null,
|
|
1317
|
+
related
|
|
1318
|
+
] }) : null
|
|
988
1319
|
] }) });
|
|
989
1320
|
}
|
|
990
1321
|
|
|
991
1322
|
// src/PublicShell.tsx
|
|
992
|
-
var
|
|
1323
|
+
var import_core20 = require("@mantine/core");
|
|
993
1324
|
|
|
994
1325
|
// src/PublicNav.tsx
|
|
995
|
-
var
|
|
996
|
-
var
|
|
1326
|
+
var import_core19 = require("@mantine/core");
|
|
1327
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
997
1328
|
function PublicNav({ items, activeId, renderLink }) {
|
|
998
|
-
return /* @__PURE__ */ (0,
|
|
1329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core19.Group, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
999
1330
|
const active = item.id === activeId;
|
|
1000
1331
|
if (renderLink) {
|
|
1001
|
-
return /* @__PURE__ */ (0,
|
|
1332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: renderLink(item, active) }, item.id);
|
|
1002
1333
|
}
|
|
1003
|
-
return /* @__PURE__ */ (0,
|
|
1004
|
-
|
|
1334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1335
|
+
import_core19.Anchor,
|
|
1005
1336
|
{
|
|
1006
1337
|
href: item.href,
|
|
1007
1338
|
"aria-current": active ? "page" : void 0,
|
|
@@ -1018,15 +1349,15 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
1018
1349
|
}
|
|
1019
1350
|
|
|
1020
1351
|
// src/PublicShell.tsx
|
|
1021
|
-
var
|
|
1352
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1022
1353
|
function InlineMobileNavigation({
|
|
1023
1354
|
mobileNavigation,
|
|
1024
1355
|
className,
|
|
1025
1356
|
mode
|
|
1026
1357
|
}) {
|
|
1027
|
-
return /* @__PURE__ */ (0,
|
|
1028
|
-
/* @__PURE__ */ (0,
|
|
1029
|
-
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Box, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1360
|
+
import_core20.Box,
|
|
1030
1361
|
{
|
|
1031
1362
|
component: "summary",
|
|
1032
1363
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -1038,13 +1369,13 @@ function InlineMobileNavigation({
|
|
|
1038
1369
|
gap: "0.5rem"
|
|
1039
1370
|
},
|
|
1040
1371
|
children: [
|
|
1041
|
-
/* @__PURE__ */ (0,
|
|
1042
|
-
/* @__PURE__ */ (0,
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Burger, { opened: false, "aria-hidden": true }),
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Text, { size: "sm", fw: 600, children: "Menu" })
|
|
1043
1374
|
]
|
|
1044
1375
|
}
|
|
1045
1376
|
),
|
|
1046
|
-
/* @__PURE__ */ (0,
|
|
1047
|
-
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1378
|
+
import_core20.Box,
|
|
1048
1379
|
{
|
|
1049
1380
|
mt: "sm",
|
|
1050
1381
|
p: "sm",
|
|
@@ -1053,7 +1384,7 @@ function InlineMobileNavigation({
|
|
|
1053
1384
|
border: "1px solid var(--mantine-color-default-border)",
|
|
1054
1385
|
background: mode === "drawer" ? "light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))" : "var(--mantine-color-body)"
|
|
1055
1386
|
},
|
|
1056
|
-
children: /* @__PURE__ */ (0,
|
|
1387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Stack, { gap: "sm", children: mobileNavigation })
|
|
1057
1388
|
}
|
|
1058
1389
|
)
|
|
1059
1390
|
] });
|
|
@@ -1074,30 +1405,30 @@ function PublicShell({
|
|
|
1074
1405
|
mobileNavigationMode = "sheet",
|
|
1075
1406
|
classNames
|
|
1076
1407
|
}) {
|
|
1077
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0,
|
|
1408
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1078
1409
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1079
1410
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1080
1411
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1081
1412
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1082
1413
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1083
|
-
return /* @__PURE__ */ (0,
|
|
1084
|
-
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1415
|
+
import_core20.AppShell,
|
|
1085
1416
|
{
|
|
1086
1417
|
className: classNames?.root,
|
|
1087
1418
|
header: { height: headerHeight },
|
|
1088
1419
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1089
1420
|
padding: 0,
|
|
1090
1421
|
children: [
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1092
|
-
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1423
|
+
import_core20.Group,
|
|
1093
1424
|
{
|
|
1094
1425
|
h: "100%",
|
|
1095
1426
|
justify: "space-between",
|
|
1096
1427
|
wrap: "nowrap",
|
|
1097
1428
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1098
1429
|
children: [
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1100
|
-
usesInlineMobileNavigation ? /* @__PURE__ */ (0,
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Group, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
1431
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1101
1432
|
InlineMobileNavigation,
|
|
1102
1433
|
{
|
|
1103
1434
|
mobileNavigation,
|
|
@@ -1105,17 +1436,17 @@ function PublicShell({
|
|
|
1105
1436
|
mode: mobileNavigationMode
|
|
1106
1437
|
}
|
|
1107
1438
|
) : null,
|
|
1108
|
-
/* @__PURE__ */ (0,
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Box, { children: brand })
|
|
1109
1440
|
] }),
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
1442
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1112
1443
|
]
|
|
1113
1444
|
}
|
|
1114
1445
|
) }) }),
|
|
1115
|
-
usesSheetMobileNavigation ? /* @__PURE__ */ (0,
|
|
1116
|
-
/* @__PURE__ */ (0,
|
|
1117
|
-
/* @__PURE__ */ (0,
|
|
1118
|
-
footer ? /* @__PURE__ */ (0,
|
|
1446
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Group, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.AppShell.Main, { children: [
|
|
1448
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Stack, { gap: "xl", children }) }),
|
|
1449
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Box, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Text, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1119
1450
|
] })
|
|
1120
1451
|
]
|
|
1121
1452
|
}
|
|
@@ -1123,18 +1454,18 @@ function PublicShell({
|
|
|
1123
1454
|
}
|
|
1124
1455
|
|
|
1125
1456
|
// src/PublicSiteFooter.tsx
|
|
1126
|
-
var
|
|
1127
|
-
var
|
|
1457
|
+
var import_core21 = require("@mantine/core");
|
|
1458
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1128
1459
|
function PublicSiteFooter({ children, meta }) {
|
|
1129
|
-
return /* @__PURE__ */ (0,
|
|
1130
|
-
children ? /* @__PURE__ */ (0,
|
|
1131
|
-
meta ? /* @__PURE__ */ (0,
|
|
1460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core21.Stack, { component: "footer", gap: "xs", children: [
|
|
1461
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Text, { size: "sm", children }) : null,
|
|
1462
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Group, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_core21.Text, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1132
1463
|
] });
|
|
1133
1464
|
}
|
|
1134
1465
|
|
|
1135
1466
|
// src/PublicBrandFooter.tsx
|
|
1136
|
-
var
|
|
1137
|
-
var
|
|
1467
|
+
var import_core22 = require("@mantine/core");
|
|
1468
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1138
1469
|
function PublicBrandFooter({
|
|
1139
1470
|
media,
|
|
1140
1471
|
brandTitle,
|
|
@@ -1149,8 +1480,8 @@ function PublicBrandFooter({
|
|
|
1149
1480
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1150
1481
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1151
1482
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1152
|
-
return /* @__PURE__ */ (0,
|
|
1153
|
-
|
|
1483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1484
|
+
import_core22.Paper,
|
|
1154
1485
|
{
|
|
1155
1486
|
component: "footer",
|
|
1156
1487
|
withBorder: true,
|
|
@@ -1158,19 +1489,19 @@ function PublicBrandFooter({
|
|
|
1158
1489
|
p: compact ? "lg" : "xl",
|
|
1159
1490
|
className: classNames?.root,
|
|
1160
1491
|
"data-layout-variant": layoutVariant,
|
|
1161
|
-
children: /* @__PURE__ */ (0,
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1163
|
-
media ? /* @__PURE__ */ (0,
|
|
1164
|
-
/* @__PURE__ */ (0,
|
|
1165
|
-
brandTitle ? /* @__PURE__ */ (0,
|
|
1166
|
-
description ? /* @__PURE__ */ (0,
|
|
1167
|
-
actions ? /* @__PURE__ */ (0,
|
|
1492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Stack, { gap: "lg", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
1494
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Box, { className: classNames?.media, children: media }) }) : null,
|
|
1495
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core22.Stack, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
1496
|
+
brandTitle ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Title, { order: 4, children: brandTitle }) : null,
|
|
1497
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Text, { c: "dimmed", children: description }) : null,
|
|
1498
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Box, { children: actions }) : null
|
|
1168
1499
|
] }) }),
|
|
1169
|
-
secondary ? /* @__PURE__ */ (0,
|
|
1500
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Stack, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1170
1501
|
] }),
|
|
1171
|
-
legal ? /* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
/* @__PURE__ */ (0,
|
|
1502
|
+
legal ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Divider, {}),
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Group, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core22.Text, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1174
1505
|
] }) : null
|
|
1175
1506
|
] })
|
|
1176
1507
|
}
|
|
@@ -1178,60 +1509,136 @@ function PublicBrandFooter({
|
|
|
1178
1509
|
}
|
|
1179
1510
|
|
|
1180
1511
|
// src/AuthShell.tsx
|
|
1181
|
-
var
|
|
1182
|
-
var
|
|
1183
|
-
function AuthShell({
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1512
|
+
var import_core23 = require("@mantine/core");
|
|
1513
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1514
|
+
function AuthShell({
|
|
1515
|
+
title,
|
|
1516
|
+
description,
|
|
1517
|
+
brand,
|
|
1518
|
+
headerActions,
|
|
1519
|
+
footer,
|
|
1520
|
+
helper,
|
|
1521
|
+
socialAuth,
|
|
1522
|
+
dividerLabel = "Or continue with your account",
|
|
1523
|
+
children
|
|
1524
|
+
}) {
|
|
1525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Container, { size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "xl", children: [
|
|
1526
|
+
brand || headerActions ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Group, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
1527
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { children: brand }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, {}),
|
|
1528
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Group, { gap: "sm", children: headerActions }) : null
|
|
1188
1529
|
] }) : null,
|
|
1189
|
-
/* @__PURE__ */ (0,
|
|
1190
|
-
/* @__PURE__ */ (0,
|
|
1191
|
-
/* @__PURE__ */ (0,
|
|
1192
|
-
description ? /* @__PURE__ */ (0,
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Card, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "lg", children: [
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core23.Stack, { gap: "xs", ta: "center", children: [
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Title, { order: 2, children: title }),
|
|
1533
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { c: "dimmed", size: "sm", children: description }) : null
|
|
1193
1534
|
] }),
|
|
1535
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Box, { children: socialAuth }) : null,
|
|
1536
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Divider, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1194
1537
|
children,
|
|
1195
|
-
helper ? /* @__PURE__ */ (0,
|
|
1538
|
+
helper ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1196
1539
|
] }) }),
|
|
1197
|
-
footer ? /* @__PURE__ */ (0,
|
|
1540
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core23.Text, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1198
1541
|
] }) }) });
|
|
1199
1542
|
}
|
|
1200
1543
|
|
|
1544
|
+
// src/SocialAuthButtons.tsx
|
|
1545
|
+
var import_core24 = require("@mantine/core");
|
|
1546
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1547
|
+
var providerConfig = {
|
|
1548
|
+
google: { label: "Google", mark: "G", color: "red" },
|
|
1549
|
+
apple: { label: "Apple", mark: "A", color: "dark" },
|
|
1550
|
+
github: { label: "GitHub", mark: "GH", color: "gray" },
|
|
1551
|
+
facebook: { label: "Facebook", mark: "F", color: "blue" },
|
|
1552
|
+
microsoft: { label: "Microsoft", mark: "M", color: "cyan" },
|
|
1553
|
+
linkedin: { label: "LinkedIn", mark: "in", color: "blue" },
|
|
1554
|
+
discord: { label: "Discord", mark: "D", color: "indigo" },
|
|
1555
|
+
x: { label: "X", mark: "X", color: "dark" },
|
|
1556
|
+
email: { label: "Email", mark: "@", color: "gray" }
|
|
1557
|
+
};
|
|
1558
|
+
function ProviderMark({ id }) {
|
|
1559
|
+
const config = providerConfig[id] ?? { label: id, mark: id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.ThemeIcon, { variant: "light", color: config.color, radius: "xl", size: "md", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "xs", fw: 700, children: config.mark }) });
|
|
1561
|
+
}
|
|
1562
|
+
function SocialAuthButton({ provider, compact = false }) {
|
|
1563
|
+
const config = providerConfig[provider.id] ?? { label: provider.id, mark: provider.id.slice(0, 2).toUpperCase(), color: "gray" };
|
|
1564
|
+
const label = provider.label ?? `Continue with ${config.label}`;
|
|
1565
|
+
const buttonProps = provider.href ? { component: "a", href: provider.href } : { onClick: provider.onClick };
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1567
|
+
import_core24.Button,
|
|
1568
|
+
{
|
|
1569
|
+
variant: "default",
|
|
1570
|
+
justify: "space-between",
|
|
1571
|
+
fullWidth: true,
|
|
1572
|
+
size: compact ? "sm" : "md",
|
|
1573
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ProviderMark, { id: provider.id }),
|
|
1574
|
+
disabled: provider.disabled,
|
|
1575
|
+
loading: provider.loading,
|
|
1576
|
+
...buttonProps,
|
|
1577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: 0, align: "flex-start", children: [
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { inherit: true, children: label }),
|
|
1579
|
+
provider.description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "xs", c: "dimmed", lh: 1.2, children: provider.description }) : null
|
|
1580
|
+
] })
|
|
1581
|
+
}
|
|
1582
|
+
);
|
|
1583
|
+
}
|
|
1584
|
+
function SocialAuthButtons({
|
|
1585
|
+
providers,
|
|
1586
|
+
title = "Continue with a trusted provider",
|
|
1587
|
+
description,
|
|
1588
|
+
layout = "stack",
|
|
1589
|
+
compact = false
|
|
1590
|
+
}) {
|
|
1591
|
+
if (!providers.length) {
|
|
1592
|
+
return null;
|
|
1593
|
+
}
|
|
1594
|
+
const content = providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SocialAuthButton, { provider, compact }, provider.id));
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: "md", children: [
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Stack, { gap: 4, ta: "center", children: [
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_core24.Group, { justify: "center", gap: "xs", children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GdsIcons.Login, { size: "1rem" }),
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { fw: 600, children: title })
|
|
1600
|
+
] }),
|
|
1601
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
1602
|
+
] }),
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Divider, {}),
|
|
1604
|
+
layout === "grid" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core24.Stack, { gap: "sm", children: content })
|
|
1605
|
+
] });
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1201
1608
|
// src/ArticleShell.tsx
|
|
1202
|
-
var
|
|
1203
|
-
var
|
|
1609
|
+
var import_core25 = require("@mantine/core");
|
|
1610
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1204
1611
|
function ArticleShell({ eyebrow, title, lead, meta, sideRail, children }) {
|
|
1205
|
-
return /* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1208
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1210
|
-
lead ? /* @__PURE__ */ (0,
|
|
1211
|
-
meta ? /* @__PURE__ */ (0,
|
|
1612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Stack, { gap: "lg", maw: 760, flex: 1, children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core25.Stack, { gap: "sm", children: [
|
|
1615
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Text, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Title, { order: 1, children: title }),
|
|
1617
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1618
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Group, { gap: "md", children: meta }) : null
|
|
1212
1619
|
] }),
|
|
1213
|
-
/* @__PURE__ */ (0,
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Stack, { gap: "md", children })
|
|
1214
1621
|
] }),
|
|
1215
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
1622
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core25.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1216
1623
|
] }) });
|
|
1217
1624
|
}
|
|
1218
1625
|
|
|
1219
1626
|
// src/CtaButtonGroup.tsx
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1627
|
+
var import_core26 = require("@mantine/core");
|
|
1628
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1222
1629
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1223
|
-
return /* @__PURE__ */ (0,
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1226
|
-
secondary ? /* @__PURE__ */ (0,
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core26.Stack, { gap: "sm", children: [
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core26.Group, { gap: "sm", align: "stretch", children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: primary }),
|
|
1633
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: secondary }) : null
|
|
1227
1634
|
] }),
|
|
1228
|
-
tertiary ? /* @__PURE__ */ (0,
|
|
1635
|
+
tertiary ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: tertiary }) : null
|
|
1229
1636
|
] });
|
|
1230
1637
|
}
|
|
1231
1638
|
|
|
1232
1639
|
// src/DocsPageShell.tsx
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1640
|
+
var import_core27 = require("@mantine/core");
|
|
1641
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1235
1642
|
function DocsPageShell({
|
|
1236
1643
|
breadcrumbs = [],
|
|
1237
1644
|
title,
|
|
@@ -1242,27 +1649,27 @@ function DocsPageShell({
|
|
|
1242
1649
|
footerNext,
|
|
1243
1650
|
children
|
|
1244
1651
|
}) {
|
|
1245
|
-
return /* @__PURE__ */ (0,
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
1247
|
-
breadcrumbs.length ? /* @__PURE__ */ (0,
|
|
1248
|
-
(crumb) => crumb.href ? /* @__PURE__ */ (0,
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Stack, { component: "article", gap: "lg", maw: 760, flex: 1, children: [
|
|
1654
|
+
breadcrumbs.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Breadcrumbs, { children: breadcrumbs.map(
|
|
1655
|
+
(crumb) => crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Anchor, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { children: crumb.label }, crumb.label)
|
|
1249
1656
|
) }) : null,
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1251
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1252
|
-
/* @__PURE__ */ (0,
|
|
1253
|
-
lead ? /* @__PURE__ */ (0,
|
|
1254
|
-
meta ? /* @__PURE__ */ (0,
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core27.Stack, { gap: "sm", children: [
|
|
1658
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Title, { order: 1, children: title }),
|
|
1660
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
1661
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Group, { gap: "md", children: meta }) : null
|
|
1255
1662
|
] }),
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1257
|
-
footerNext ? /* @__PURE__ */ (0,
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Stack, { gap: "md", children }),
|
|
1664
|
+
footerNext ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Anchor, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1258
1665
|
] }),
|
|
1259
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
1666
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core27.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1260
1667
|
] }) });
|
|
1261
1668
|
}
|
|
1262
1669
|
|
|
1263
1670
|
// src/EditorialHero.tsx
|
|
1264
|
-
var
|
|
1265
|
-
var
|
|
1671
|
+
var import_core28 = require("@mantine/core");
|
|
1672
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1266
1673
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1267
1674
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1268
1675
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1274,8 +1681,8 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1274
1681
|
return { variant: "default", seenPrimary };
|
|
1275
1682
|
}
|
|
1276
1683
|
function HeroAction({ action, variant }) {
|
|
1277
|
-
const content = /* @__PURE__ */ (0,
|
|
1278
|
-
|
|
1684
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1685
|
+
import_core28.Anchor,
|
|
1279
1686
|
{
|
|
1280
1687
|
href: action.href,
|
|
1281
1688
|
onClick: action.onClick,
|
|
@@ -1299,8 +1706,8 @@ function HeroAction({ action, variant }) {
|
|
|
1299
1706
|
}
|
|
1300
1707
|
);
|
|
1301
1708
|
if (!action.href) {
|
|
1302
|
-
return /* @__PURE__ */ (0,
|
|
1303
|
-
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1710
|
+
import_core28.Box,
|
|
1304
1711
|
{
|
|
1305
1712
|
component: "button",
|
|
1306
1713
|
type: "button",
|
|
@@ -1327,30 +1734,30 @@ function HeroAction({ action, variant }) {
|
|
|
1327
1734
|
return content;
|
|
1328
1735
|
}
|
|
1329
1736
|
function LoadingHero({ compact }) {
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1331
|
-
/* @__PURE__ */ (0,
|
|
1332
|
-
/* @__PURE__ */ (0,
|
|
1333
|
-
/* @__PURE__ */ (0,
|
|
1334
|
-
/* @__PURE__ */ (0,
|
|
1335
|
-
/* @__PURE__ */ (0,
|
|
1336
|
-
/* @__PURE__ */ (0,
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1338
|
-
/* @__PURE__ */ (0,
|
|
1737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Paper, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: "md", children: [
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 16, width: 96, radius: "xl" }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 48, width: "90%", radius: "md" }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 18, width: "100%", radius: "md" }),
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 18, width: "82%", radius: "md" }),
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Group, { children: [
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 40, width: 140, radius: "md" }),
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { height: 40, width: 140, radius: "md" })
|
|
1339
1746
|
] })
|
|
1340
1747
|
] }) }),
|
|
1341
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Skeleton, { radius: "lg" }) }) })
|
|
1342
1749
|
] }) });
|
|
1343
1750
|
}
|
|
1344
1751
|
function MediaFallback() {
|
|
1345
|
-
return /* @__PURE__ */ (0,
|
|
1346
|
-
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1753
|
+
import_core28.ThemeIcon,
|
|
1347
1754
|
{
|
|
1348
1755
|
size: "100%",
|
|
1349
1756
|
radius: "lg",
|
|
1350
1757
|
color: "gray",
|
|
1351
1758
|
variant: "light",
|
|
1352
1759
|
"aria-label": "Hero media is unavailable",
|
|
1353
|
-
children: /* @__PURE__ */ (0,
|
|
1760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GdsIcons.Gallery, { size: "2.5rem" })
|
|
1354
1761
|
}
|
|
1355
1762
|
) });
|
|
1356
1763
|
}
|
|
@@ -1370,8 +1777,8 @@ function MediaFrame({
|
|
|
1370
1777
|
} else if (mediaFade === "soft-start") {
|
|
1371
1778
|
overlayBackground = "linear-gradient(90deg, light-dark(rgba(255,255,255,0.9), rgba(17,24,39,0.72)) 0%, rgba(255,255,255,0) 28%)";
|
|
1372
1779
|
}
|
|
1373
|
-
return /* @__PURE__ */ (0,
|
|
1374
|
-
|
|
1780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1781
|
+
import_core28.Box,
|
|
1375
1782
|
{
|
|
1376
1783
|
component: "figure",
|
|
1377
1784
|
m: 0,
|
|
@@ -1384,9 +1791,9 @@ function MediaFrame({
|
|
|
1384
1791
|
},
|
|
1385
1792
|
"aria-label": mediaAlt,
|
|
1386
1793
|
children: [
|
|
1387
|
-
media ?? /* @__PURE__ */ (0,
|
|
1388
|
-
media && overlayBackground ? /* @__PURE__ */ (0,
|
|
1389
|
-
|
|
1794
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MediaFallback, {}),
|
|
1795
|
+
media && overlayBackground ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1796
|
+
import_core28.Box,
|
|
1390
1797
|
{
|
|
1391
1798
|
"aria-hidden": true,
|
|
1392
1799
|
style: {
|
|
@@ -1419,7 +1826,7 @@ function EditorialHero({
|
|
|
1419
1826
|
classNames
|
|
1420
1827
|
}) {
|
|
1421
1828
|
if (loading) {
|
|
1422
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingHero, { compact });
|
|
1423
1830
|
}
|
|
1424
1831
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
1425
1832
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -1427,15 +1834,15 @@ function EditorialHero({
|
|
|
1427
1834
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
1428
1835
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
1429
1836
|
seenPrimary = resolved.seenPrimary;
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
1431
1838
|
});
|
|
1432
|
-
const textSlot = /* @__PURE__ */ (0,
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1435
|
-
/* @__PURE__ */ (0,
|
|
1436
|
-
description ? /* @__PURE__ */ (0,
|
|
1839
|
+
const textSlot = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Stack, { gap: "sm", align: stackAlign, children: [
|
|
1841
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Title, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
1843
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
1437
1844
|
] }),
|
|
1438
|
-
renderedActions.length ? /* @__PURE__ */ (0,
|
|
1845
|
+
renderedActions.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Box, { className: classNames?.actions, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1439
1846
|
CtaButtonGroup,
|
|
1440
1847
|
{
|
|
1441
1848
|
primary: renderedActions[0],
|
|
@@ -1443,8 +1850,8 @@ function EditorialHero({
|
|
|
1443
1850
|
tertiary: renderedActions[2]
|
|
1444
1851
|
}
|
|
1445
1852
|
) }) : null,
|
|
1446
|
-
meta.length ? /* @__PURE__ */ (0,
|
|
1447
|
-
|
|
1853
|
+
meta.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Group, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1854
|
+
import_core28.Group,
|
|
1448
1855
|
{
|
|
1449
1856
|
gap: 6,
|
|
1450
1857
|
px: "sm",
|
|
@@ -1455,17 +1862,17 @@ function EditorialHero({
|
|
|
1455
1862
|
},
|
|
1456
1863
|
children: [
|
|
1457
1864
|
item.icon,
|
|
1458
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
1459
1866
|
]
|
|
1460
1867
|
},
|
|
1461
1868
|
item.id
|
|
1462
1869
|
)) }) : null
|
|
1463
1870
|
] });
|
|
1464
|
-
const mediaSlot = error ? /* @__PURE__ */ (0,
|
|
1465
|
-
const textCol = /* @__PURE__ */ (0,
|
|
1466
|
-
const mediaCol = /* @__PURE__ */ (0,
|
|
1467
|
-
return /* @__PURE__ */ (0,
|
|
1468
|
-
|
|
1871
|
+
const mediaSlot = error ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
1872
|
+
const textCol = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
1873
|
+
const mediaCol = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core28.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
1874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1875
|
+
import_core28.Paper,
|
|
1469
1876
|
{
|
|
1470
1877
|
component: "section",
|
|
1471
1878
|
withBorder: true,
|
|
@@ -1473,7 +1880,7 @@ function EditorialHero({
|
|
|
1473
1880
|
p: compact ? "lg" : "xl",
|
|
1474
1881
|
className: classNames?.root,
|
|
1475
1882
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
1476
|
-
children: /* @__PURE__ */ (0,
|
|
1883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core28.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
1477
1884
|
textCol,
|
|
1478
1885
|
mediaCol
|
|
1479
1886
|
] })
|
|
@@ -1482,19 +1889,19 @@ function EditorialHero({
|
|
|
1482
1889
|
}
|
|
1483
1890
|
|
|
1484
1891
|
// src/FeatureBand.tsx
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1892
|
+
var import_core29 = require("@mantine/core");
|
|
1893
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1487
1894
|
function FeatureBandSkeleton({
|
|
1488
1895
|
columns = 3,
|
|
1489
1896
|
bordered = true,
|
|
1490
1897
|
variant = "default"
|
|
1491
1898
|
}) {
|
|
1492
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
-
/* @__PURE__ */ (0,
|
|
1494
|
-
/* @__PURE__ */ (0,
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1496
|
-
/* @__PURE__ */ (0,
|
|
1497
|
-
/* @__PURE__ */ (0,
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "md", children: [
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "xs", children: [
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 20, width: "75%", radius: "md" }),
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 14, width: "100%", radius: "md" }),
|
|
1904
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Skeleton, { height: 14, width: "82%", radius: "md" })
|
|
1498
1905
|
] })
|
|
1499
1906
|
] }) }, index)) });
|
|
1500
1907
|
}
|
|
@@ -1507,10 +1914,10 @@ function FeatureBand({
|
|
|
1507
1914
|
variant = "default"
|
|
1508
1915
|
}) {
|
|
1509
1916
|
if (loading) {
|
|
1510
|
-
return /* @__PURE__ */ (0,
|
|
1917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureBandSkeleton, { columns, bordered, variant });
|
|
1511
1918
|
}
|
|
1512
1919
|
if (!items.length) {
|
|
1513
|
-
return emptyState ? /* @__PURE__ */ (0,
|
|
1920
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1514
1921
|
EmptyState,
|
|
1515
1922
|
{
|
|
1516
1923
|
title: "No supporting details available",
|
|
@@ -1518,9 +1925,9 @@ function FeatureBand({
|
|
|
1518
1925
|
}
|
|
1519
1926
|
);
|
|
1520
1927
|
}
|
|
1521
|
-
return /* @__PURE__ */ (0,
|
|
1522
|
-
variant === "process" ? /* @__PURE__ */ (0,
|
|
1523
|
-
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Box, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "md", children: [
|
|
1929
|
+
variant === "process" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1930
|
+
import_core29.Text,
|
|
1524
1931
|
{
|
|
1525
1932
|
fw: 800,
|
|
1526
1933
|
size: "sm",
|
|
@@ -1532,32 +1939,335 @@ function FeatureBand({
|
|
|
1532
1939
|
},
|
|
1533
1940
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
1534
1941
|
}
|
|
1535
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0,
|
|
1536
|
-
/* @__PURE__ */ (0,
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
item.description ? /* @__PURE__ */ (0,
|
|
1539
|
-
item.meta ? /* @__PURE__ */ (0,
|
|
1942
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core29.Stack, { gap: "xs", children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Title, { order: 4, children: item.title }),
|
|
1945
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Text, { c: "dimmed", children: item.description }) : null,
|
|
1946
|
+
item.meta ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core29.Text, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
1540
1947
|
] })
|
|
1541
1948
|
] }) }, item.id)) }) });
|
|
1542
1949
|
}
|
|
1543
1950
|
|
|
1951
|
+
// src/MapPanel.tsx
|
|
1952
|
+
var import_core31 = require("@mantine/core");
|
|
1953
|
+
|
|
1954
|
+
// src/ActionBar.tsx
|
|
1955
|
+
var import_core30 = require("@mantine/core");
|
|
1956
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1957
|
+
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
1958
|
+
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
1959
|
+
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
1960
|
+
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
1961
|
+
const Icon = config.icon;
|
|
1962
|
+
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
1963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1964
|
+
import_core30.Button,
|
|
1965
|
+
{
|
|
1966
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: "1rem", stroke: 1.75 }),
|
|
1967
|
+
"aria-label": ariaLabel ?? label,
|
|
1968
|
+
variant: variant ?? fallbackVariant,
|
|
1969
|
+
...props,
|
|
1970
|
+
children: label
|
|
1971
|
+
},
|
|
1972
|
+
`${slot}-${actionId}`
|
|
1973
|
+
);
|
|
1974
|
+
}
|
|
1975
|
+
function ActionBar({
|
|
1976
|
+
primary,
|
|
1977
|
+
secondary = [],
|
|
1978
|
+
tertiary = [],
|
|
1979
|
+
iconOnly = [],
|
|
1980
|
+
gap = "sm",
|
|
1981
|
+
vocabularyPacks = []
|
|
1982
|
+
}) {
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core30.Stack, { gap, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { gap, wrap: "wrap", children: [
|
|
1985
|
+
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
1986
|
+
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
1987
|
+
] }),
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core30.Group, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1989
|
+
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
1990
|
+
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
1991
|
+
const Icon = config.icon;
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1993
|
+
import_core30.ActionIcon,
|
|
1994
|
+
{
|
|
1995
|
+
variant: "subtle",
|
|
1996
|
+
size: "lg",
|
|
1997
|
+
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
1998
|
+
...props,
|
|
1999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
2000
|
+
},
|
|
2001
|
+
`icon-${action}`
|
|
2002
|
+
);
|
|
2003
|
+
}),
|
|
2004
|
+
primary ? renderSemanticAction(primary, "primary", vocabularyPacks) : null
|
|
2005
|
+
] })
|
|
2006
|
+
] }) });
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
// src/MapPanel.tsx
|
|
2010
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2011
|
+
function MapPanel({
|
|
2012
|
+
title,
|
|
2013
|
+
description,
|
|
2014
|
+
actions,
|
|
2015
|
+
loading = false,
|
|
2016
|
+
empty,
|
|
2017
|
+
error,
|
|
2018
|
+
embedTitle,
|
|
2019
|
+
iframeSrc,
|
|
2020
|
+
iframeSandbox = "allow-scripts allow-same-origin allow-popups",
|
|
2021
|
+
renderMap,
|
|
2022
|
+
minHeight = 320
|
|
2023
|
+
}) {
|
|
2024
|
+
let body;
|
|
2025
|
+
if (loading) {
|
|
2026
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2027
|
+
StateBlock,
|
|
2028
|
+
{
|
|
2029
|
+
variant: "loading",
|
|
2030
|
+
title: "Loading map",
|
|
2031
|
+
description: "The shared map panel is still preparing the embedded surface.",
|
|
2032
|
+
compact: true
|
|
2033
|
+
}
|
|
2034
|
+
);
|
|
2035
|
+
} else if (error) {
|
|
2036
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2037
|
+
} else if (!iframeSrc && !renderMap) {
|
|
2038
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2039
|
+
StateBlock,
|
|
2040
|
+
{
|
|
2041
|
+
variant: "empty",
|
|
2042
|
+
title: "No map available",
|
|
2043
|
+
description: empty ?? "Add coordinates or a sanctioned embed source to render this panel.",
|
|
2044
|
+
compact: true
|
|
2045
|
+
}
|
|
2046
|
+
);
|
|
2047
|
+
} else if (renderMap) {
|
|
2048
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Box, { style: { minHeight }, children: renderMap() });
|
|
2049
|
+
} else {
|
|
2050
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2051
|
+
"iframe",
|
|
2052
|
+
{
|
|
2053
|
+
src: iframeSrc,
|
|
2054
|
+
title: embedTitle ?? "Embedded map",
|
|
2055
|
+
sandbox: iframeSandbox,
|
|
2056
|
+
loading: "lazy",
|
|
2057
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
2058
|
+
style: { width: "100%", height: "100%", border: 0, borderRadius: 12 }
|
|
2059
|
+
}
|
|
2060
|
+
) });
|
|
2061
|
+
}
|
|
2062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Stack, { gap: "md", children: [
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core31.Stack, { gap: 4, children: [
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Title, { order: 3, children: title }),
|
|
2066
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core31.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
2067
|
+
] }),
|
|
2068
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ActionBar, { ...actions }) : null
|
|
2069
|
+
] }),
|
|
2070
|
+
body
|
|
2071
|
+
] }) });
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
// src/PublicFlowShell.tsx
|
|
2075
|
+
var import_core32 = require("@mantine/core");
|
|
2076
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2077
|
+
var stageTone = {
|
|
2078
|
+
idle: { label: "Idle", color: "gray" },
|
|
2079
|
+
loading: { label: "Loading", color: "blue" },
|
|
2080
|
+
ready: { label: "Ready", color: "teal" },
|
|
2081
|
+
error: { label: "Error", color: "red" },
|
|
2082
|
+
complete: { label: "Complete", color: "teal" }
|
|
2083
|
+
};
|
|
2084
|
+
function toActionBar(actions = []) {
|
|
2085
|
+
if (!actions.length) {
|
|
2086
|
+
return void 0;
|
|
2087
|
+
}
|
|
2088
|
+
const ordered = [...actions].sort((left, right) => {
|
|
2089
|
+
const rank = { primary: 0, secondary: 1, tertiary: 2 };
|
|
2090
|
+
return rank[left.priority] - rank[right.priority];
|
|
2091
|
+
});
|
|
2092
|
+
const primary = ordered.find((action) => action.priority === "primary");
|
|
2093
|
+
const secondary = ordered.filter((action) => action.priority === "secondary");
|
|
2094
|
+
const tertiary = ordered.filter((action) => action.priority === "tertiary");
|
|
2095
|
+
return {
|
|
2096
|
+
primary: primary ? {
|
|
2097
|
+
action: primary.action,
|
|
2098
|
+
disabled: primary.disabled,
|
|
2099
|
+
loading: primary.loading,
|
|
2100
|
+
onClick: primary.onClick
|
|
2101
|
+
} : void 0,
|
|
2102
|
+
secondary: secondary.map((action) => ({
|
|
2103
|
+
action: action.action,
|
|
2104
|
+
disabled: action.disabled,
|
|
2105
|
+
loading: action.loading,
|
|
2106
|
+
onClick: action.onClick
|
|
2107
|
+
})),
|
|
2108
|
+
tertiary: tertiary.map((action) => ({
|
|
2109
|
+
action: action.action,
|
|
2110
|
+
disabled: action.disabled,
|
|
2111
|
+
loading: action.loading,
|
|
2112
|
+
onClick: action.onClick
|
|
2113
|
+
}))
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function PublicFlowShell({
|
|
2117
|
+
stage,
|
|
2118
|
+
eyebrow,
|
|
2119
|
+
exitAction,
|
|
2120
|
+
hardwareSurface,
|
|
2121
|
+
emptyState,
|
|
2122
|
+
errorState
|
|
2123
|
+
}) {
|
|
2124
|
+
const tone = stageTone[stage.status];
|
|
2125
|
+
const actionBar = toActionBar(stage.actions);
|
|
2126
|
+
let body = stage.body;
|
|
2127
|
+
if (stage.status === "loading") {
|
|
2128
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2129
|
+
StateBlock,
|
|
2130
|
+
{
|
|
2131
|
+
variant: "loading",
|
|
2132
|
+
title: "Preparing flow",
|
|
2133
|
+
description: stage.description ?? "The current public flow stage is still loading."
|
|
2134
|
+
}
|
|
2135
|
+
);
|
|
2136
|
+
} else if (stage.status === "error") {
|
|
2137
|
+
body = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2138
|
+
StateBlock,
|
|
2139
|
+
{
|
|
2140
|
+
variant: "error",
|
|
2141
|
+
title: "Flow unavailable",
|
|
2142
|
+
description: stage.description ?? "This public flow could not continue safely."
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
} else if (!stage.body && !hardwareSurface) {
|
|
2146
|
+
body = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2147
|
+
EmptyState,
|
|
2148
|
+
{
|
|
2149
|
+
title: "No stage content available",
|
|
2150
|
+
description: "Add the current flow stage body or a bounded hardware surface to render this contract."
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Stack, { gap: "lg", children: [
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Stack, { gap: 4, children: [
|
|
2157
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core32.Group, { gap: "sm", wrap: "wrap", children: [
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Title, { order: 2, children: stage.title }),
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Badge, { variant: "light", color: tone.color, children: tone.label })
|
|
2161
|
+
] }),
|
|
2162
|
+
stage.description ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2163
|
+
] }),
|
|
2164
|
+
exitAction
|
|
2165
|
+
] }),
|
|
2166
|
+
stage.notice ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_core32.Text, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2167
|
+
body,
|
|
2168
|
+
hardwareSurface,
|
|
2169
|
+
stage.aside,
|
|
2170
|
+
actionBar ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ActionBar, { ...actionBar }) : null
|
|
2171
|
+
] }) });
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
// src/PlaybackSurface.tsx
|
|
2175
|
+
var import_core33 = require("@mantine/core");
|
|
2176
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2177
|
+
var stateTone = {
|
|
2178
|
+
loading: { label: "Loading", color: "blue" },
|
|
2179
|
+
ready: { label: "Ready", color: "teal" },
|
|
2180
|
+
playing: { label: "Playing", color: "teal" },
|
|
2181
|
+
empty: { label: "Empty", color: "gray" },
|
|
2182
|
+
error: { label: "Error", color: "red" },
|
|
2183
|
+
degraded: { label: "Degraded", color: "orange" }
|
|
2184
|
+
};
|
|
2185
|
+
function PlaybackSurface({
|
|
2186
|
+
title,
|
|
2187
|
+
state,
|
|
2188
|
+
media,
|
|
2189
|
+
statusMessage,
|
|
2190
|
+
controls,
|
|
2191
|
+
emptyState,
|
|
2192
|
+
errorState,
|
|
2193
|
+
overlays,
|
|
2194
|
+
mode = "embedded"
|
|
2195
|
+
}) {
|
|
2196
|
+
const tone = stateTone[state];
|
|
2197
|
+
let content;
|
|
2198
|
+
if (state === "loading") {
|
|
2199
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2200
|
+
StateBlock,
|
|
2201
|
+
{
|
|
2202
|
+
variant: "loading",
|
|
2203
|
+
title: "Loading playback",
|
|
2204
|
+
description: "The playback surface is still preparing timed or fullscreen media."
|
|
2205
|
+
}
|
|
2206
|
+
);
|
|
2207
|
+
} else if (state === "empty") {
|
|
2208
|
+
content = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2209
|
+
EmptyState,
|
|
2210
|
+
{
|
|
2211
|
+
title: "No playback content available",
|
|
2212
|
+
description: "Add media assets or a playlist to render this playback surface."
|
|
2213
|
+
}
|
|
2214
|
+
);
|
|
2215
|
+
} else if (state === "error") {
|
|
2216
|
+
content = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2217
|
+
StateBlock,
|
|
2218
|
+
{
|
|
2219
|
+
variant: "error",
|
|
2220
|
+
title: "Playback unavailable",
|
|
2221
|
+
description: "The playback surface could not render the current media safely."
|
|
2222
|
+
}
|
|
2223
|
+
);
|
|
2224
|
+
} else {
|
|
2225
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2226
|
+
media,
|
|
2227
|
+
overlays
|
|
2228
|
+
] });
|
|
2229
|
+
}
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Paper, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2231
|
+
title || statusMessage || controls ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Stack, { gap: 4, children: [
|
|
2233
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Title, { order: 3, children: title }) : null,
|
|
2234
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Text, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2235
|
+
] }),
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core33.Group, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core33.Badge, { variant: "light", color: tone.color, children: tone.label }),
|
|
2238
|
+
controls
|
|
2239
|
+
] })
|
|
2240
|
+
] }) : null,
|
|
2241
|
+
state === "degraded" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2242
|
+
StateBlock,
|
|
2243
|
+
{
|
|
2244
|
+
variant: "info",
|
|
2245
|
+
title: "Playback degraded",
|
|
2246
|
+
description: statusMessage ?? "Playback is continuing with reduced fidelity or recoverable media failures.",
|
|
2247
|
+
compact: true
|
|
2248
|
+
}
|
|
2249
|
+
) : null,
|
|
2250
|
+
content
|
|
2251
|
+
] }) });
|
|
2252
|
+
}
|
|
2253
|
+
|
|
1544
2254
|
// src/MediaField.tsx
|
|
1545
|
-
var
|
|
2255
|
+
var import_core35 = require("@mantine/core");
|
|
1546
2256
|
|
|
1547
2257
|
// src/FormField.tsx
|
|
1548
|
-
var
|
|
1549
|
-
var
|
|
2258
|
+
var import_core34 = require("@mantine/core");
|
|
2259
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1550
2260
|
function FormField({ label, description, error, children }) {
|
|
1551
|
-
return /* @__PURE__ */ (0,
|
|
1552
|
-
typeof label === "string" ? /* @__PURE__ */ (0,
|
|
1553
|
-
description ? typeof description === "string" ? /* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Box, { component: "label", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core34.Stack, { gap: 4, children: [
|
|
2262
|
+
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
2263
|
+
description ? typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
1554
2264
|
children,
|
|
1555
|
-
error ? typeof error === "string" ? /* @__PURE__ */ (0,
|
|
2265
|
+
error ? typeof error === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core34.Text, { size: "xs", c: "red.7", children: error }) : error : null
|
|
1556
2266
|
] }) });
|
|
1557
2267
|
}
|
|
1558
2268
|
|
|
1559
2269
|
// src/MediaField.tsx
|
|
1560
|
-
var
|
|
2270
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1561
2271
|
var stateLabels = {
|
|
1562
2272
|
empty: { label: "Empty", color: "gray" },
|
|
1563
2273
|
selected: { label: "Selected", color: "blue" },
|
|
@@ -1585,32 +2295,32 @@ function MediaField({
|
|
|
1585
2295
|
mode = "stacked"
|
|
1586
2296
|
}) {
|
|
1587
2297
|
const stateBadge = stateLabels[state];
|
|
1588
|
-
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0,
|
|
1589
|
-
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0,
|
|
1590
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
const resolvedRemoveAction = removeAction ?? (onRemove ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Button, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
2299
|
+
const resolvedResetAction = resetAction ?? (onReset ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Button, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1591
2301
|
FormField,
|
|
1592
2302
|
{
|
|
1593
2303
|
label,
|
|
1594
2304
|
description,
|
|
1595
2305
|
error,
|
|
1596
|
-
children: /* @__PURE__ */ (0,
|
|
1597
|
-
/* @__PURE__ */ (0,
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
2306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Stack, { gap: "md", children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Group, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Group, { gap: "xs", justify: "flex-end", children: [
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
1599
2309
|
statusAction
|
|
1600
2310
|
] }) }),
|
|
1601
2311
|
preview ? preview : null,
|
|
1602
|
-
uploadControl || urlInput ? /* @__PURE__ */ (0,
|
|
1603
|
-
/* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
2312
|
+
uploadControl || urlInput ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Divider, {}),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Stack, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
1605
2315
|
uploadControl,
|
|
1606
2316
|
urlInput
|
|
1607
2317
|
] })
|
|
1608
2318
|
] }) : null,
|
|
1609
|
-
value ? /* @__PURE__ */ (0,
|
|
1610
|
-
helpText ? /* @__PURE__ */ (0,
|
|
1611
|
-
policyText ? /* @__PURE__ */ (0,
|
|
2319
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
2320
|
+
helpText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
2321
|
+
policyText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core35.Text, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
1612
2322
|
typeof error !== "string" && error ? error : null,
|
|
1613
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0,
|
|
2323
|
+
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core35.Group, { gap: "sm", children: [
|
|
1614
2324
|
resolvedResetAction,
|
|
1615
2325
|
retryAction,
|
|
1616
2326
|
resolvedRemoveAction
|
|
@@ -1621,49 +2331,49 @@ function MediaField({
|
|
|
1621
2331
|
}
|
|
1622
2332
|
|
|
1623
2333
|
// src/MediaCard.tsx
|
|
1624
|
-
var
|
|
1625
|
-
var
|
|
2334
|
+
var import_core36 = require("@mantine/core");
|
|
2335
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1626
2336
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
1627
2337
|
const EyeIcon = GdsIcons.Eye;
|
|
1628
|
-
return /* @__PURE__ */ (0,
|
|
1629
|
-
/* @__PURE__ */ (0,
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Card, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Card.Section, { pos: "relative", children: [
|
|
1630
2340
|
image,
|
|
1631
|
-
overlay ? /* @__PURE__ */ (0,
|
|
2341
|
+
overlay ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
1632
2342
|
] }),
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1634
|
-
/* @__PURE__ */ (0,
|
|
1635
|
-
/* @__PURE__ */ (0,
|
|
1636
|
-
/* @__PURE__ */ (0,
|
|
1637
|
-
description ? /* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Stack, { gap: "sm", mt: "md", children: [
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Group, { justify: "space-between", align: "flex-start", children: [
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core36.Stack, { gap: 4, children: [
|
|
2346
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Title, { order: 4, children: title }),
|
|
2347
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Text, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
1638
2348
|
] }),
|
|
1639
|
-
status ? /* @__PURE__ */ (0,
|
|
2349
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Badge, { variant: "light", children: status }) : null
|
|
1640
2350
|
] }),
|
|
1641
|
-
actions.length ? /* @__PURE__ */ (0,
|
|
2351
|
+
actions.length ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.Group, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core36.ActionIcon, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
1642
2352
|
] })
|
|
1643
2353
|
] });
|
|
1644
2354
|
}
|
|
1645
2355
|
|
|
1646
2356
|
// src/AccessSummary.tsx
|
|
1647
|
-
var
|
|
1648
|
-
var
|
|
2357
|
+
var import_core37 = require("@mantine/core");
|
|
2358
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1649
2359
|
function AccessSummary({ title, roles, scope, blocked = false, description }) {
|
|
1650
|
-
return /* @__PURE__ */ (0,
|
|
1651
|
-
/* @__PURE__ */ (0,
|
|
1652
|
-
/* @__PURE__ */ (0,
|
|
1653
|
-
/* @__PURE__ */ (0,
|
|
2360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Stack, { gap: "sm", children: [
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Group, { justify: "space-between", align: "center", children: [
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Title, { order: 4, children: title }),
|
|
2363
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Badge, { color: blocked ? "red" : "teal", variant: "light", children: blocked ? "Blocked" : "Allowed" })
|
|
1654
2364
|
] }),
|
|
1655
|
-
/* @__PURE__ */ (0,
|
|
1656
|
-
scope ? /* @__PURE__ */ (0,
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Group, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Badge, { variant: "outline", children: role }, role)) }),
|
|
2366
|
+
scope ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core37.Text, { size: "sm", c: "dimmed", children: [
|
|
1657
2367
|
"Scope: ",
|
|
1658
2368
|
scope
|
|
1659
2369
|
] }) : null,
|
|
1660
|
-
description ? /* @__PURE__ */ (0,
|
|
2370
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core37.Text, { size: "sm", children: description }) : null
|
|
1661
2371
|
] }) });
|
|
1662
2372
|
}
|
|
1663
2373
|
|
|
1664
2374
|
// src/PageHeader.tsx
|
|
1665
|
-
var
|
|
1666
|
-
var
|
|
2375
|
+
var import_core38 = require("@mantine/core");
|
|
2376
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1667
2377
|
function PageHeader({
|
|
1668
2378
|
title,
|
|
1669
2379
|
description,
|
|
@@ -1674,19 +2384,19 @@ function PageHeader({
|
|
|
1674
2384
|
}) {
|
|
1675
2385
|
const resolvedDescription = description ?? subtitle;
|
|
1676
2386
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
1677
|
-
return /* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
1680
|
-
/* @__PURE__ */ (0,
|
|
1681
|
-
resolvedDescription && /* @__PURE__ */ (0,
|
|
2387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core38.Group, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core38.Stack, { gap: "xs", children: [
|
|
2389
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Text, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Title, { order: 1, children: title }),
|
|
2391
|
+
resolvedDescription && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Text, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
1682
2392
|
] }),
|
|
1683
|
-
actions ? /* @__PURE__ */ (0,
|
|
2393
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core38.Box, { children: actions }) : null
|
|
1684
2394
|
] });
|
|
1685
2395
|
}
|
|
1686
2396
|
|
|
1687
2397
|
// src/FilterDrawer.tsx
|
|
1688
|
-
var
|
|
1689
|
-
var
|
|
2398
|
+
var import_core39 = require("@mantine/core");
|
|
2399
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1690
2400
|
function FilterDrawer({
|
|
1691
2401
|
opened,
|
|
1692
2402
|
onClose,
|
|
@@ -1702,8 +2412,8 @@ function FilterDrawer({
|
|
|
1702
2412
|
}) {
|
|
1703
2413
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
1704
2414
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
1705
|
-
return /* @__PURE__ */ (0,
|
|
1706
|
-
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2416
|
+
import_core39.Drawer,
|
|
1707
2417
|
{
|
|
1708
2418
|
opened,
|
|
1709
2419
|
onClose,
|
|
@@ -1711,11 +2421,11 @@ function FilterDrawer({
|
|
|
1711
2421
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
1712
2422
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
1713
2423
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
1714
|
-
children: /* @__PURE__ */ (0,
|
|
1715
|
-
description ? /* @__PURE__ */ (0,
|
|
2424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Stack, { gap: "md", children: [
|
|
2425
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core39.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
1716
2426
|
children,
|
|
1717
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0,
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Group, { justify: "space-between", mt: "md", children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core39.Group, { gap: "sm", children: [
|
|
1719
2429
|
closeAction,
|
|
1720
2430
|
resolvedSecondaryAction
|
|
1721
2431
|
] }),
|
|
@@ -1727,8 +2437,8 @@ function FilterDrawer({
|
|
|
1727
2437
|
}
|
|
1728
2438
|
|
|
1729
2439
|
// src/PlaceholderPanel.tsx
|
|
1730
|
-
var
|
|
1731
|
-
var
|
|
2440
|
+
var import_core40 = require("@mantine/core");
|
|
2441
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1732
2442
|
function PlaceholderPanel({
|
|
1733
2443
|
title,
|
|
1734
2444
|
description,
|
|
@@ -1738,16 +2448,16 @@ function PlaceholderPanel({
|
|
|
1738
2448
|
mode
|
|
1739
2449
|
}) {
|
|
1740
2450
|
if (mode === "live" && children) {
|
|
1741
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children });
|
|
1742
2452
|
}
|
|
1743
|
-
return /* @__PURE__ */ (0,
|
|
1744
|
-
badge ? /* @__PURE__ */ (0,
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1746
|
-
/* @__PURE__ */ (0,
|
|
1747
|
-
/* @__PURE__ */ (0,
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core40.Stack, { gap: "md", children: [
|
|
2454
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Badge, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core40.Stack, { gap: "xs", children: [
|
|
2456
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Title, { order: 4, children: title }),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Text, { c: "dimmed", children: description })
|
|
1748
2458
|
] }),
|
|
1749
|
-
footer ? /* @__PURE__ */ (0,
|
|
1750
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core40.Text, { size: "sm", children: footer }) : null,
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1751
2461
|
StateBlock,
|
|
1752
2462
|
{
|
|
1753
2463
|
variant: "not-enough-data",
|
|
@@ -1760,8 +2470,8 @@ function PlaceholderPanel({
|
|
|
1760
2470
|
}
|
|
1761
2471
|
|
|
1762
2472
|
// src/SimpleDataTable.tsx
|
|
1763
|
-
var
|
|
1764
|
-
var
|
|
2473
|
+
var import_core41 = require("@mantine/core");
|
|
2474
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1765
2475
|
function SimpleDataTable({
|
|
1766
2476
|
columns,
|
|
1767
2477
|
rows,
|
|
@@ -1772,23 +2482,23 @@ function SimpleDataTable({
|
|
|
1772
2482
|
getRowKey
|
|
1773
2483
|
}) {
|
|
1774
2484
|
if (error) {
|
|
1775
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
1776
2486
|
}
|
|
1777
2487
|
if (loading) {
|
|
1778
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
1779
2489
|
}
|
|
1780
2490
|
if (!rows.length) {
|
|
1781
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
1782
2492
|
}
|
|
1783
|
-
return /* @__PURE__ */ (0,
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1785
|
-
/* @__PURE__ */ (0,
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.ScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core41.Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core41.Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
1786
2496
|
] }) });
|
|
1787
2497
|
}
|
|
1788
2498
|
|
|
1789
2499
|
// src/StatsSection.tsx
|
|
1790
|
-
var
|
|
1791
|
-
var
|
|
2500
|
+
var import_core42 = require("@mantine/core");
|
|
2501
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1792
2502
|
function StatsSection({
|
|
1793
2503
|
title,
|
|
1794
2504
|
loading = false,
|
|
@@ -1800,11 +2510,11 @@ function StatsSection({
|
|
|
1800
2510
|
}) {
|
|
1801
2511
|
let content = children;
|
|
1802
2512
|
if (error) {
|
|
1803
|
-
content = /* @__PURE__ */ (0,
|
|
2513
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
1804
2514
|
} else if (loading) {
|
|
1805
|
-
content = /* @__PURE__ */ (0,
|
|
2515
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
1806
2516
|
} else if (belowThreshold) {
|
|
1807
|
-
content = /* @__PURE__ */ (0,
|
|
2517
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1808
2518
|
StateBlock,
|
|
1809
2519
|
{
|
|
1810
2520
|
variant: "not-enough-data",
|
|
@@ -1814,10 +2524,10 @@ function StatsSection({
|
|
|
1814
2524
|
}
|
|
1815
2525
|
);
|
|
1816
2526
|
} else if (placeholder) {
|
|
1817
|
-
content = /* @__PURE__ */ (0,
|
|
2527
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
1818
2528
|
}
|
|
1819
|
-
return /* @__PURE__ */ (0,
|
|
1820
|
-
/* @__PURE__ */ (0,
|
|
2529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core42.Stack, { gap: "md", children: [
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core42.Title, { order: 3, children: title }),
|
|
1821
2531
|
content
|
|
1822
2532
|
] });
|
|
1823
2533
|
}
|
|
@@ -3136,33 +3846,42 @@ function getGdsMessages(locale) {
|
|
|
3136
3846
|
ConsumerSection,
|
|
3137
3847
|
CtaButtonGroup,
|
|
3138
3848
|
DataToolbar,
|
|
3849
|
+
DetailProfileShell,
|
|
3139
3850
|
DocsPageShell,
|
|
3140
3851
|
EditorialCard,
|
|
3141
3852
|
EditorialHero,
|
|
3142
3853
|
EmptyState,
|
|
3143
3854
|
FeatureBand,
|
|
3144
3855
|
FilterDrawer,
|
|
3856
|
+
FoodMenuSection,
|
|
3145
3857
|
FormField,
|
|
3146
3858
|
GdsIcons,
|
|
3147
3859
|
GdsVocabulary,
|
|
3860
|
+
ListingCard,
|
|
3861
|
+
MapPanel,
|
|
3148
3862
|
MediaCard,
|
|
3149
3863
|
MediaField,
|
|
3150
3864
|
MetricCard,
|
|
3151
3865
|
PageHeader,
|
|
3152
3866
|
PlaceholderPanel,
|
|
3867
|
+
PlaybackSurface,
|
|
3153
3868
|
ProductCard,
|
|
3154
3869
|
ProgressCard,
|
|
3155
3870
|
PublicBrandFooter,
|
|
3871
|
+
PublicFlowShell,
|
|
3872
|
+
PublicFoodCard,
|
|
3156
3873
|
PublicNav,
|
|
3157
3874
|
PublicProductCard,
|
|
3158
3875
|
PublicShell,
|
|
3159
3876
|
PublicSiteFooter,
|
|
3160
3877
|
SectionPanel,
|
|
3161
3878
|
SimpleDataTable,
|
|
3879
|
+
SocialAuthButtons,
|
|
3162
3880
|
StateBlock,
|
|
3163
3881
|
StatsSection,
|
|
3164
3882
|
StatusBadge,
|
|
3165
3883
|
ar,
|
|
3884
|
+
createGdsVocabularyPack,
|
|
3166
3885
|
de,
|
|
3167
3886
|
en,
|
|
3168
3887
|
es,
|
|
@@ -3174,6 +3893,8 @@ function getGdsMessages(locale) {
|
|
|
3174
3893
|
he,
|
|
3175
3894
|
hu,
|
|
3176
3895
|
it,
|
|
3896
|
+
mergeGdsVocabularyPacks,
|
|
3177
3897
|
resolveAccentPanelStyles,
|
|
3898
|
+
resolveSemanticActionConfig,
|
|
3178
3899
|
ru
|
|
3179
3900
|
});
|