@doneisbetter/gds-core 2.6.7 → 3.0.1
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-6FX7WZZO.mjs +1822 -0
- package/dist/{chunk-LH2KMMXT.mjs → chunk-YP7RL2MC.mjs} +995 -299
- package/dist/client.d.mts +271 -10
- package/dist/client.d.ts +271 -10
- package/dist/client.js +2036 -503
- package/dist/client.mjs +86 -4
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2036 -503
- package/dist/index.mjs +86 -4
- package/dist/{server-BSuY9Qx6.d.mts → server-DCXU_K9q.d.mts} +248 -9
- package/dist/{server-BSuY9Qx6.d.ts → server-DCXU_K9q.d.ts} +248 -9
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1048 -330
- package/dist/server.mjs +41 -1
- package/package.json +2 -2
- package/dist/chunk-IUYPELGQ.mjs +0 -1028
package/dist/server.js
CHANGED
|
@@ -22,12 +22,18 @@ var server_exports = {};
|
|
|
22
22
|
__export(server_exports, {
|
|
23
23
|
AccentPanel: () => AccentPanel,
|
|
24
24
|
AccessSummary: () => AccessSummary,
|
|
25
|
+
ActiveFilterChips: () => ActiveFilterChips,
|
|
25
26
|
ArticleShell: () => ArticleShell,
|
|
27
|
+
AsyncSurface: () => AsyncSurface,
|
|
26
28
|
AuthShell: () => AuthShell,
|
|
29
|
+
BannerNotice: () => BannerNotice,
|
|
27
30
|
BrowseSurface: () => BrowseSurface,
|
|
31
|
+
BulkActionsBar: () => BulkActionsBar,
|
|
32
|
+
ChartTokenPanel: () => ChartTokenPanel,
|
|
28
33
|
ChoiceChip: () => ChoiceChip,
|
|
29
34
|
ConsumerDashboardGrid: () => ConsumerDashboardGrid,
|
|
30
35
|
ConsumerSection: () => ConsumerSection,
|
|
36
|
+
CountBadge: () => CountBadge,
|
|
31
37
|
CtaButtonGroup: () => CtaButtonGroup,
|
|
32
38
|
DataToolbar: () => DataToolbar,
|
|
33
39
|
DetailProfileShell: () => DetailProfileShell,
|
|
@@ -35,19 +41,25 @@ __export(server_exports, {
|
|
|
35
41
|
EditorialCard: () => EditorialCard,
|
|
36
42
|
EditorialHero: () => EditorialHero,
|
|
37
43
|
EmptyState: () => EmptyState,
|
|
44
|
+
EvidencePanel: () => EvidencePanel,
|
|
38
45
|
FeatureBand: () => FeatureBand,
|
|
39
46
|
FilterDrawer: () => FilterDrawer,
|
|
40
47
|
FoodMenuSection: () => FoodMenuSection,
|
|
41
48
|
FormField: () => FormField,
|
|
49
|
+
GdsChart: () => GdsChart,
|
|
42
50
|
GdsIcons: () => GdsIcons,
|
|
43
51
|
GdsVocabulary: () => GdsVocabulary,
|
|
52
|
+
InlineAlert: () => InlineAlert,
|
|
53
|
+
LabelTag: () => LabelTag,
|
|
44
54
|
ListingCard: () => ListingCard,
|
|
45
55
|
MapPanel: () => MapPanel,
|
|
46
56
|
MediaCard: () => MediaCard,
|
|
47
57
|
MediaField: () => MediaField,
|
|
48
58
|
MetricCard: () => MetricCard,
|
|
59
|
+
NotificationCenterView: () => NotificationCenterView,
|
|
49
60
|
PROVIDER_IDENTITY_REGISTRY: () => PROVIDER_IDENTITY_REGISTRY,
|
|
50
61
|
PageHeader: () => PageHeader,
|
|
62
|
+
PeriodSelector: () => PeriodSelector,
|
|
51
63
|
PlaceholderPanel: () => PlaceholderPanel,
|
|
52
64
|
PlaybackSurface: () => PlaybackSurface,
|
|
53
65
|
ProductCard: () => ProductCard,
|
|
@@ -64,9 +76,12 @@ __export(server_exports, {
|
|
|
64
76
|
ReferenceLinkGrid: () => ReferenceLinkGrid,
|
|
65
77
|
ReferenceLocaleNotice: () => ReferenceLocaleNotice,
|
|
66
78
|
ReferenceSection: () => ReferenceSection,
|
|
79
|
+
ReportingSection: () => ReportingSection,
|
|
80
|
+
ResultSummary: () => ResultSummary,
|
|
67
81
|
SectionPanel: () => SectionPanel,
|
|
68
82
|
SimpleDataTable: () => SimpleDataTable,
|
|
69
83
|
SocialAuthButtons: () => SocialAuthButtons,
|
|
84
|
+
SortMenu: () => SortMenu,
|
|
70
85
|
StateBlock: () => StateBlock,
|
|
71
86
|
StatsSection: () => StatsSection,
|
|
72
87
|
StatusBadge: () => StatusBadge,
|
|
@@ -76,16 +91,21 @@ __export(server_exports, {
|
|
|
76
91
|
en: () => en,
|
|
77
92
|
es: () => es,
|
|
78
93
|
fr: () => fr,
|
|
94
|
+
gdsCardSizePaddingMap: () => gdsCardSizePaddingMap,
|
|
95
|
+
gdsCardTitleOrderMap: () => gdsCardTitleOrderMap,
|
|
79
96
|
gdsLocales: () => gdsLocales,
|
|
80
97
|
getGdsMessages: () => getGdsMessages,
|
|
81
98
|
getProviderIdentityLabel: () => getProviderIdentityLabel,
|
|
99
|
+
getProviderIdentityPolicy: () => getProviderIdentityPolicy,
|
|
82
100
|
getSemanticActionConfig: () => getSemanticActionConfig,
|
|
83
101
|
getSemanticActionLabel: () => getSemanticActionLabel,
|
|
102
|
+
getSupportedProviderIdentityIds: () => getSupportedProviderIdentityIds,
|
|
84
103
|
he: () => he,
|
|
85
104
|
hu: () => hu,
|
|
86
105
|
isPresentationMode: () => isPresentationMode,
|
|
87
106
|
it: () => it,
|
|
88
107
|
mergeGdsVocabularyPacks: () => mergeGdsVocabularyPacks,
|
|
108
|
+
renderGdsLayout: () => renderGdsLayout,
|
|
89
109
|
resolveAccentPanelStyles: () => resolveAccentPanelStyles,
|
|
90
110
|
resolveSemanticActionConfig: () => resolveSemanticActionConfig,
|
|
91
111
|
resolveSurfacePresentationStyles: () => resolveSurfacePresentationStyles,
|
|
@@ -388,9 +408,24 @@ var statusColorMap = {
|
|
|
388
408
|
info: "blue",
|
|
389
409
|
neutral: "gray"
|
|
390
410
|
};
|
|
411
|
+
var labelTagColorMap = {
|
|
412
|
+
neutral: "gray",
|
|
413
|
+
info: "blue",
|
|
414
|
+
warning: "yellow",
|
|
415
|
+
success: "green"
|
|
416
|
+
};
|
|
391
417
|
function StatusBadge({ status, children, ...props }) {
|
|
392
418
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.Badge, { color: statusColorMap[status], variant: "light", ...props, children });
|
|
393
419
|
}
|
|
420
|
+
function LabelTag({ tone = "neutral", label, ...props }) {
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.Badge, { color: labelTagColorMap[tone], variant: "outline", ...props, children: label });
|
|
422
|
+
}
|
|
423
|
+
function CountBadge({ value, cap = 99, srLabel, ...props }) {
|
|
424
|
+
const normalizedValue = Number.isFinite(value) ? Math.max(0, Math.floor(value)) : 0;
|
|
425
|
+
const normalizedCap = Math.max(1, Math.floor(cap));
|
|
426
|
+
const displayValue = normalizedValue > normalizedCap ? `${normalizedCap}+` : String(normalizedValue);
|
|
427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.Badge, { color: "violet", variant: "filled", "aria-label": srLabel, ...props, children: displayValue });
|
|
428
|
+
}
|
|
394
429
|
|
|
395
430
|
// src/EmptyState.tsx
|
|
396
431
|
var import_core3 = require("@mantine/core");
|
|
@@ -703,6 +738,24 @@ function ConsumerDashboardGrid({
|
|
|
703
738
|
|
|
704
739
|
// src/ProductCard.tsx
|
|
705
740
|
var import_core11 = require("@mantine/core");
|
|
741
|
+
|
|
742
|
+
// src/CardContracts.ts
|
|
743
|
+
var gdsCardSizePaddingMap = {
|
|
744
|
+
xs: "xs",
|
|
745
|
+
sm: "sm",
|
|
746
|
+
md: "md",
|
|
747
|
+
lg: "lg",
|
|
748
|
+
xl: "xl"
|
|
749
|
+
};
|
|
750
|
+
var gdsCardTitleOrderMap = {
|
|
751
|
+
xs: 6,
|
|
752
|
+
sm: 5,
|
|
753
|
+
md: 4,
|
|
754
|
+
lg: 4,
|
|
755
|
+
xl: 3
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
// src/ProductCard.tsx
|
|
706
759
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
707
760
|
function ProductCard({
|
|
708
761
|
title,
|
|
@@ -713,16 +766,17 @@ function ProductCard({
|
|
|
713
766
|
metadata = [],
|
|
714
767
|
primaryAction,
|
|
715
768
|
secondaryActions = [],
|
|
716
|
-
footer
|
|
769
|
+
footer,
|
|
770
|
+
size = "md"
|
|
717
771
|
}) {
|
|
718
772
|
const MoreIcon = GdsIcons.Menu;
|
|
719
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding:
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.Card, { withBorder: true, radius: "lg", padding: gdsCardSizePaddingMap[size], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core11.Stack, { gap: "md", children: [
|
|
720
774
|
media,
|
|
721
775
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core11.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", children: [
|
|
722
776
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core11.Group, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
723
777
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.ThemeIcon, { variant: "light", size: "xl", radius: "xl", "aria-hidden": true, children: icon }) : null,
|
|
724
778
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core11.Stack, { gap: 4, children: [
|
|
725
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.Title, { order:
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.Title, { order: gdsCardTitleOrderMap[size], children: title }),
|
|
726
780
|
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core11.Text, { size: "sm", c: "dimmed", lineClamp: 3, children: description }) : null
|
|
727
781
|
] })
|
|
728
782
|
] }),
|
|
@@ -907,8 +961,11 @@ function PublicProductCard({
|
|
|
907
961
|
secondaryAction,
|
|
908
962
|
metadata = [],
|
|
909
963
|
compact = false,
|
|
964
|
+
size = "md",
|
|
910
965
|
loading = false,
|
|
911
|
-
disabled = false
|
|
966
|
+
disabled = false,
|
|
967
|
+
interactiveMode = "none",
|
|
968
|
+
onSurfaceActivate
|
|
912
969
|
}) {
|
|
913
970
|
if (loading) {
|
|
914
971
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LoadingCard, { compact });
|
|
@@ -924,11 +981,12 @@ function PublicProductCard({
|
|
|
924
981
|
const pickupHelper = helperKind === "pickup" ? helperText : pickupNote;
|
|
925
982
|
const inventoryHelper = helperKind === "inventory" ? helperText : inventoryNote;
|
|
926
983
|
const hasSupportingRegion = Boolean(price || supportingHelper || pickupHelper || inventoryHelper);
|
|
927
|
-
|
|
984
|
+
const interactiveProps = interactiveMode === "surface-button" ? { component: "button", type: "button", onClick: onSurfaceActivate } : {};
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Card, { withBorder: true, radius: "lg", padding: compact ? "md" : gdsCardSizePaddingMap[size], ...interactiveProps, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Stack, { gap: compact ? "sm" : "md", children: [
|
|
928
986
|
image ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageFallback, { compact }),
|
|
929
987
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Group, { justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
930
988
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Stack, { gap: 4, style: { minWidth: 0, flex: 1 }, children: [
|
|
931
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Title, { order: compact ? 5 :
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Title, { order: compact ? 5 : gdsCardTitleOrderMap[size], lineClamp: 2, children: title }),
|
|
932
990
|
description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
933
991
|
] }),
|
|
934
992
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label })
|
|
@@ -1193,17 +1251,27 @@ function ListingCard({
|
|
|
1193
1251
|
primaryAction,
|
|
1194
1252
|
saveAction,
|
|
1195
1253
|
shareAction,
|
|
1196
|
-
compact = false
|
|
1254
|
+
compact = false,
|
|
1255
|
+
size = "md",
|
|
1256
|
+
interactiveMode = "none",
|
|
1257
|
+
revealContent,
|
|
1258
|
+
onSurfaceActivate,
|
|
1259
|
+
defaultFlipped = false
|
|
1197
1260
|
}) {
|
|
1261
|
+
const cardPadding = compact ? "md" : gdsCardSizePaddingMap[size];
|
|
1198
1262
|
const titleContent = href && typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Text, { component: "a", href, inherit: true, td: "none", children: title }) : title;
|
|
1199
|
-
|
|
1263
|
+
const interactiveProps = interactiveMode === "surface-link" && href ? { component: "a", href } : interactiveMode === "surface-button" ? { component: "button", type: "button", onClick: onSurfaceActivate } : {};
|
|
1264
|
+
if (interactiveMode === "flip" && defaultFlipped && revealContent) {
|
|
1265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Card, { withBorder: true, radius: "lg", padding: cardPadding, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Stack, { gap: "sm", children: revealContent }) });
|
|
1266
|
+
}
|
|
1267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Card, { withBorder: true, radius: "lg", padding: cardPadding, ...interactiveProps, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Stack, { gap: compact ? "sm" : "md", children: [
|
|
1200
1268
|
image ?? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListingImageFallback, { mediaRatio }),
|
|
1201
1269
|
featured || sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Group, { justify: "space-between", gap: "sm", wrap: "wrap", children: [
|
|
1202
1270
|
featured ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Badge, { variant: "light", color: "violet", children: "Featured" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {}),
|
|
1203
1271
|
sponsoredDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Text, { size: "xs", c: "dimmed", children: sponsoredDisclosure }) : null
|
|
1204
1272
|
] }) : null,
|
|
1205
1273
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Stack, { gap: 4, children: [
|
|
1206
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Title, { order: compact ? 5 :
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Title, { order: compact ? 5 : gdsCardTitleOrderMap[size], lineClamp: 2, children: titleContent }),
|
|
1207
1275
|
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Text, { size: "sm", c: "dimmed", lineClamp: compact ? 2 : 3, children: description }) : null
|
|
1208
1276
|
] }),
|
|
1209
1277
|
metadata.length ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Stack, { gap: "xs", children: metadata.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Group, { justify: "space-between", align: "flex-start", gap: "sm", wrap: "nowrap", children: [
|
|
@@ -1218,7 +1286,8 @@ function ListingCard({
|
|
|
1218
1286
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Group, { gap: "xs", wrap: "nowrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
1219
1287
|
saveAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListingAffordance, { affordance: saveAction }) : null,
|
|
1220
1288
|
shareAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListingAffordance, { affordance: shareAction }) : null,
|
|
1221
|
-
primaryAction
|
|
1289
|
+
primaryAction,
|
|
1290
|
+
interactiveMode === "flip" && revealContent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Text, { size: "xs", c: "dimmed", children: "Flip mode supports reveal surfaces." }) : null
|
|
1222
1291
|
] })
|
|
1223
1292
|
] })
|
|
1224
1293
|
] }) });
|
|
@@ -1459,20 +1528,209 @@ function DetailProfileShell({
|
|
|
1459
1528
|
] }) });
|
|
1460
1529
|
}
|
|
1461
1530
|
|
|
1531
|
+
// src/AsyncSurface.tsx
|
|
1532
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1533
|
+
function getRetryAction(onRetry) {
|
|
1534
|
+
if (!onRetry) {
|
|
1535
|
+
return void 0;
|
|
1536
|
+
}
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { type: "button", onClick: onRetry, children: "Retry" });
|
|
1538
|
+
}
|
|
1539
|
+
function renderStateBlock({
|
|
1540
|
+
variant,
|
|
1541
|
+
title,
|
|
1542
|
+
description,
|
|
1543
|
+
compact,
|
|
1544
|
+
presentation,
|
|
1545
|
+
minHeight,
|
|
1546
|
+
contentAlign,
|
|
1547
|
+
contentJustify,
|
|
1548
|
+
action
|
|
1549
|
+
}) {
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1551
|
+
StateBlock,
|
|
1552
|
+
{
|
|
1553
|
+
variant,
|
|
1554
|
+
title,
|
|
1555
|
+
description,
|
|
1556
|
+
action,
|
|
1557
|
+
compact,
|
|
1558
|
+
presentation,
|
|
1559
|
+
minHeight,
|
|
1560
|
+
contentAlign,
|
|
1561
|
+
contentJustify
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
function AsyncSurface({
|
|
1566
|
+
state,
|
|
1567
|
+
successContent,
|
|
1568
|
+
idleContent,
|
|
1569
|
+
loadingTitle = "Loading",
|
|
1570
|
+
loadingDescription = "This surface is still synchronizing.",
|
|
1571
|
+
emptyTitle = "No results",
|
|
1572
|
+
emptyDescription = "No data is available for this surface yet.",
|
|
1573
|
+
errorTitle = "Unable to load",
|
|
1574
|
+
errorDescription = "Something went wrong while preparing this surface.",
|
|
1575
|
+
refreshingTitle = "Refreshing",
|
|
1576
|
+
refreshingDescription = "The latest data is being fetched.",
|
|
1577
|
+
onRetry,
|
|
1578
|
+
retryAction,
|
|
1579
|
+
compact = false,
|
|
1580
|
+
presentation = "inline",
|
|
1581
|
+
minHeight,
|
|
1582
|
+
contentAlign,
|
|
1583
|
+
contentJustify
|
|
1584
|
+
}) {
|
|
1585
|
+
const fallbackRetryAction = retryAction ?? getRetryAction(onRetry);
|
|
1586
|
+
if (state === "success") {
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: successContent });
|
|
1588
|
+
}
|
|
1589
|
+
if (state === "idle") {
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: idleContent ?? successContent ?? null });
|
|
1591
|
+
}
|
|
1592
|
+
if (state === "loading") {
|
|
1593
|
+
return renderStateBlock({
|
|
1594
|
+
variant: "loading",
|
|
1595
|
+
title: loadingTitle,
|
|
1596
|
+
description: loadingDescription,
|
|
1597
|
+
compact,
|
|
1598
|
+
presentation,
|
|
1599
|
+
minHeight,
|
|
1600
|
+
contentAlign,
|
|
1601
|
+
contentJustify
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
if (state === "empty") {
|
|
1605
|
+
return renderStateBlock({
|
|
1606
|
+
variant: "empty",
|
|
1607
|
+
title: emptyTitle,
|
|
1608
|
+
description: emptyDescription,
|
|
1609
|
+
compact,
|
|
1610
|
+
presentation,
|
|
1611
|
+
minHeight,
|
|
1612
|
+
contentAlign,
|
|
1613
|
+
contentJustify,
|
|
1614
|
+
action: fallbackRetryAction
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
if (state === "error") {
|
|
1618
|
+
return renderStateBlock({
|
|
1619
|
+
variant: "error",
|
|
1620
|
+
title: errorTitle,
|
|
1621
|
+
description: errorDescription,
|
|
1622
|
+
compact,
|
|
1623
|
+
presentation,
|
|
1624
|
+
minHeight,
|
|
1625
|
+
contentAlign,
|
|
1626
|
+
contentJustify,
|
|
1627
|
+
action: fallbackRetryAction
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
return renderStateBlock({
|
|
1631
|
+
variant: "info",
|
|
1632
|
+
title: refreshingTitle,
|
|
1633
|
+
description: refreshingDescription,
|
|
1634
|
+
compact,
|
|
1635
|
+
presentation,
|
|
1636
|
+
minHeight,
|
|
1637
|
+
contentAlign,
|
|
1638
|
+
contentJustify
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
// src/ListingPrimitives.tsx
|
|
1643
|
+
var import_core21 = require("@mantine/core");
|
|
1644
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1645
|
+
function ActiveFilterChips({
|
|
1646
|
+
filters,
|
|
1647
|
+
emptyLabel = "No active filters."
|
|
1648
|
+
}) {
|
|
1649
|
+
if (!filters.length) {
|
|
1650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core21.Text, { size: "sm", c: "dimmed", children: emptyLabel });
|
|
1651
|
+
}
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core21.Group, { gap: "xs", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1653
|
+
import_core21.Badge,
|
|
1654
|
+
{
|
|
1655
|
+
variant: "light",
|
|
1656
|
+
rightSection: filter.onRemove ? "\xD7" : void 0,
|
|
1657
|
+
style: filter.onRemove ? { cursor: "pointer" } : void 0,
|
|
1658
|
+
onClick: filter.onRemove,
|
|
1659
|
+
children: filter.label
|
|
1660
|
+
},
|
|
1661
|
+
filter.id
|
|
1662
|
+
)) });
|
|
1663
|
+
}
|
|
1664
|
+
function ResultSummary({
|
|
1665
|
+
resultCount,
|
|
1666
|
+
noun = "results",
|
|
1667
|
+
description
|
|
1668
|
+
}) {
|
|
1669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core21.Stack, { gap: 2, children: [
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core21.Text, { size: "sm", fw: 600, children: [
|
|
1671
|
+
resultCount,
|
|
1672
|
+
" ",
|
|
1673
|
+
noun
|
|
1674
|
+
] }),
|
|
1675
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core21.Text, { size: "xs", c: "dimmed", children: description }) : null
|
|
1676
|
+
] });
|
|
1677
|
+
}
|
|
1678
|
+
function SortMenu({
|
|
1679
|
+
value,
|
|
1680
|
+
options,
|
|
1681
|
+
onChange,
|
|
1682
|
+
label = "Sort"
|
|
1683
|
+
}) {
|
|
1684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1685
|
+
import_core21.Select,
|
|
1686
|
+
{
|
|
1687
|
+
"aria-label": label,
|
|
1688
|
+
label,
|
|
1689
|
+
value,
|
|
1690
|
+
data: options,
|
|
1691
|
+
onChange: (next) => {
|
|
1692
|
+
if (next) {
|
|
1693
|
+
onChange?.(next);
|
|
1694
|
+
}
|
|
1695
|
+
},
|
|
1696
|
+
w: 220
|
|
1697
|
+
}
|
|
1698
|
+
);
|
|
1699
|
+
}
|
|
1700
|
+
function BulkActionsBar({
|
|
1701
|
+
selectedCount,
|
|
1702
|
+
actions,
|
|
1703
|
+
clearAction
|
|
1704
|
+
}) {
|
|
1705
|
+
if (selectedCount <= 0) {
|
|
1706
|
+
return null;
|
|
1707
|
+
}
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core21.Group, { justify: "space-between", align: "center", children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core21.Text, { size: "sm", fw: 600, children: [
|
|
1710
|
+
selectedCount,
|
|
1711
|
+
" selected"
|
|
1712
|
+
] }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core21.Group, { gap: "xs", children: [
|
|
1714
|
+
actions,
|
|
1715
|
+
clearAction ?? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core21.Button, { variant: "subtle", size: "xs", children: "Clear selection" })
|
|
1716
|
+
] })
|
|
1717
|
+
] });
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1462
1720
|
// src/PublicShell.tsx
|
|
1463
|
-
var
|
|
1721
|
+
var import_core23 = require("@mantine/core");
|
|
1464
1722
|
|
|
1465
1723
|
// src/PublicNav.tsx
|
|
1466
|
-
var
|
|
1467
|
-
var
|
|
1724
|
+
var import_core22 = require("@mantine/core");
|
|
1725
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1468
1726
|
function PublicNav({ items, activeId, renderLink }) {
|
|
1469
|
-
return /* @__PURE__ */ (0,
|
|
1727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_core22.Group, { component: "nav", "aria-label": "Primary", gap: "lg", wrap: "nowrap", children: items.map((item) => {
|
|
1470
1728
|
const active = item.id === activeId;
|
|
1471
1729
|
if (renderLink) {
|
|
1472
|
-
return /* @__PURE__ */ (0,
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: renderLink(item, active) }, item.id);
|
|
1473
1731
|
}
|
|
1474
|
-
return /* @__PURE__ */ (0,
|
|
1475
|
-
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1733
|
+
import_core22.Anchor,
|
|
1476
1734
|
{
|
|
1477
1735
|
href: item.href,
|
|
1478
1736
|
"aria-current": active ? "page" : void 0,
|
|
@@ -1489,15 +1747,15 @@ function PublicNav({ items, activeId, renderLink }) {
|
|
|
1489
1747
|
}
|
|
1490
1748
|
|
|
1491
1749
|
// src/PublicShell.tsx
|
|
1492
|
-
var
|
|
1750
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1493
1751
|
function InlineMobileNavigation({
|
|
1494
1752
|
mobileNavigation,
|
|
1495
1753
|
className,
|
|
1496
1754
|
mode
|
|
1497
1755
|
}) {
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
-
/* @__PURE__ */ (0,
|
|
1500
|
-
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core23.Box, { component: "details", hiddenFrom: "sm", className, children: [
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1758
|
+
import_core23.Box,
|
|
1501
1759
|
{
|
|
1502
1760
|
component: "summary",
|
|
1503
1761
|
"aria-label": mode === "drawer" ? "Open site navigation drawer" : "Open site navigation",
|
|
@@ -1509,13 +1767,13 @@ function InlineMobileNavigation({
|
|
|
1509
1767
|
gap: "0.5rem"
|
|
1510
1768
|
},
|
|
1511
1769
|
children: [
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1513
|
-
/* @__PURE__ */ (0,
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Burger, { opened: false, "aria-hidden": true }),
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Text, { size: "sm", fw: 600, children: "Menu" })
|
|
1514
1772
|
]
|
|
1515
1773
|
}
|
|
1516
1774
|
),
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1518
|
-
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1776
|
+
import_core23.Box,
|
|
1519
1777
|
{
|
|
1520
1778
|
mt: "sm",
|
|
1521
1779
|
p: "sm",
|
|
@@ -1524,7 +1782,7 @@ function InlineMobileNavigation({
|
|
|
1524
1782
|
border: "1px solid var(--mantine-color-default-border)",
|
|
1525
1783
|
background: mode === "drawer" ? "light-dark(var(--mantine-color-white), color-mix(in srgb, var(--mantine-color-dark-7) 92%, black))" : "var(--mantine-color-body)"
|
|
1526
1784
|
},
|
|
1527
|
-
children: /* @__PURE__ */ (0,
|
|
1785
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Stack, { gap: "sm", children: mobileNavigation })
|
|
1528
1786
|
}
|
|
1529
1787
|
)
|
|
1530
1788
|
] });
|
|
@@ -1545,30 +1803,30 @@ function PublicShell({
|
|
|
1545
1803
|
mobileNavigationMode = "sheet",
|
|
1546
1804
|
classNames
|
|
1547
1805
|
}) {
|
|
1548
|
-
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0,
|
|
1806
|
+
const resolvedNavigation = navigation ?? (navItems ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PublicNav, { items: navItems, activeId: activeNavId }) : null);
|
|
1549
1807
|
const containerSize = maxContentWidth ?? (compact ? "md" : "lg");
|
|
1550
1808
|
const headerHeight = headerVariant === "compact" ? 64 : headerVariant === "branded-quiet" ? 88 : 72;
|
|
1551
1809
|
const mainPadding = headerVariant === "compact" ? "lg" : "xl";
|
|
1552
1810
|
const usesInlineMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode !== "sheet";
|
|
1553
1811
|
const usesSheetMobileNavigation = Boolean(mobileNavigation) && mobileNavigationMode === "sheet";
|
|
1554
|
-
return /* @__PURE__ */ (0,
|
|
1555
|
-
|
|
1812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1813
|
+
import_core23.AppShell,
|
|
1556
1814
|
{
|
|
1557
1815
|
className: classNames?.root,
|
|
1558
1816
|
header: { height: headerHeight },
|
|
1559
1817
|
footer: usesSheetMobileNavigation ? { height: 68 } : void 0,
|
|
1560
1818
|
padding: 0,
|
|
1561
1819
|
children: [
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1563
|
-
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.AppShell.Header, { withBorder: headerBordered, className: classNames?.header, "data-header-variant": headerVariant, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Container, { size: containerSize, h: "100%", py: headerVariant === "branded-quiet" ? "sm" : 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1821
|
+
import_core23.Group,
|
|
1564
1822
|
{
|
|
1565
1823
|
h: "100%",
|
|
1566
1824
|
justify: "space-between",
|
|
1567
1825
|
wrap: "nowrap",
|
|
1568
1826
|
gap: headerVariant === "compact" ? "sm" : "lg",
|
|
1569
1827
|
children: [
|
|
1570
|
-
/* @__PURE__ */ (0,
|
|
1571
|
-
usesInlineMobileNavigation ? /* @__PURE__ */ (0,
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core23.Group, { wrap: "nowrap", gap: headerVariant === "compact" ? "xs" : "sm", className: classNames?.brand, children: [
|
|
1829
|
+
usesInlineMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1572
1830
|
InlineMobileNavigation,
|
|
1573
1831
|
{
|
|
1574
1832
|
mobileNavigation,
|
|
@@ -1576,17 +1834,17 @@ function PublicShell({
|
|
|
1576
1834
|
mode: mobileNavigationMode
|
|
1577
1835
|
}
|
|
1578
1836
|
) : null,
|
|
1579
|
-
/* @__PURE__ */ (0,
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Box, { children: brand })
|
|
1580
1838
|
] }),
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Group, { visibleFrom: "sm", gap: headerVariant === "compact" ? "md" : "lg", className: classNames?.navigation, children: resolvedNavigation }),
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Group, { gap: "sm", className: classNames?.actions, children: actions })
|
|
1583
1841
|
]
|
|
1584
1842
|
}
|
|
1585
1843
|
) }) }),
|
|
1586
|
-
usesSheetMobileNavigation ? /* @__PURE__ */ (0,
|
|
1587
|
-
/* @__PURE__ */ (0,
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1589
|
-
footer ? /* @__PURE__ */ (0,
|
|
1844
|
+
usesSheetMobileNavigation ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.AppShell.Footer, { withBorder: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Container, { size: containerSize, h: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Group, { h: "100%", justify: "space-around", wrap: "nowrap", children: mobileNavigation }) }) }) : null,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core23.AppShell.Main, { children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Container, { size: containerSize, py: mainPadding, className: classNames?.content, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Stack, { gap: "xl", children }) }),
|
|
1847
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Box, { component: typeof footer === "string" ? "footer" : "div", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Container, { size: containerSize, children: typeof footer === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core23.Text, { size: "sm", c: "dimmed", children: footer }) : footer }) }) : null
|
|
1590
1848
|
] })
|
|
1591
1849
|
]
|
|
1592
1850
|
}
|
|
@@ -1594,18 +1852,18 @@ function PublicShell({
|
|
|
1594
1852
|
}
|
|
1595
1853
|
|
|
1596
1854
|
// src/PublicSiteFooter.tsx
|
|
1597
|
-
var
|
|
1598
|
-
var
|
|
1855
|
+
var import_core24 = require("@mantine/core");
|
|
1856
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1599
1857
|
function PublicSiteFooter({ children, meta }) {
|
|
1600
|
-
return /* @__PURE__ */ (0,
|
|
1601
|
-
children ? /* @__PURE__ */ (0,
|
|
1602
|
-
meta ? /* @__PURE__ */ (0,
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core24.Stack, { component: "footer", gap: "xs", children: [
|
|
1859
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_core24.Text, { size: "sm", children }) : null,
|
|
1860
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_core24.Group, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_core24.Text, { size: "xs", c: "dimmed", children: meta }) }) : null
|
|
1603
1861
|
] });
|
|
1604
1862
|
}
|
|
1605
1863
|
|
|
1606
1864
|
// src/PublicBrandFooter.tsx
|
|
1607
|
-
var
|
|
1608
|
-
var
|
|
1865
|
+
var import_core25 = require("@mantine/core");
|
|
1866
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1609
1867
|
function PublicBrandFooter({
|
|
1610
1868
|
media,
|
|
1611
1869
|
brandTitle,
|
|
@@ -1620,8 +1878,8 @@ function PublicBrandFooter({
|
|
|
1620
1878
|
const mediaSpan = layoutVariant === "immersive-media" ? 5 : 4;
|
|
1621
1879
|
const primarySpan = media ? layoutVariant === "balanced-quote" ? 4 : 4 : secondary ? 6 : 12;
|
|
1622
1880
|
const secondarySpan = media ? Math.max(3, 12 - mediaSpan - primarySpan) : Math.max(4, 12 - primarySpan);
|
|
1623
|
-
return /* @__PURE__ */ (0,
|
|
1624
|
-
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1882
|
+
import_core25.Paper,
|
|
1625
1883
|
{
|
|
1626
1884
|
component: "footer",
|
|
1627
1885
|
withBorder: true,
|
|
@@ -1629,19 +1887,19 @@ function PublicBrandFooter({
|
|
|
1629
1887
|
p: compact ? "lg" : "xl",
|
|
1630
1888
|
className: classNames?.root,
|
|
1631
1889
|
"data-layout-variant": layoutVariant,
|
|
1632
|
-
children: /* @__PURE__ */ (0,
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1634
|
-
media ? /* @__PURE__ */ (0,
|
|
1635
|
-
/* @__PURE__ */ (0,
|
|
1636
|
-
brandTitle ? /* @__PURE__ */ (0,
|
|
1637
|
-
description ? /* @__PURE__ */ (0,
|
|
1638
|
-
actions ? /* @__PURE__ */ (0,
|
|
1890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core25.Stack, { gap: "lg", children: [
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core25.Grid, { gutter: compact ? "lg" : "xl", align: "flex-start", children: [
|
|
1892
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Grid.Col, { span: { base: 12, md: mediaSpan }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Box, { className: classNames?.media, children: media }) }) : null,
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Grid.Col, { span: { base: 12, md: primarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core25.Stack, { gap: compact ? "xs" : "sm", className: classNames?.primary, children: [
|
|
1894
|
+
brandTitle ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Title, { order: 4, children: brandTitle }) : null,
|
|
1895
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Text, { c: "dimmed", children: description }) : null,
|
|
1896
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Box, { children: actions }) : null
|
|
1639
1897
|
] }) }),
|
|
1640
|
-
secondary ? /* @__PURE__ */ (0,
|
|
1898
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Grid.Col, { span: { base: 12, md: secondarySpan }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Stack, { gap: compact ? "xs" : "sm", className: classNames?.secondary, children: secondary }) }) : null
|
|
1641
1899
|
] }),
|
|
1642
|
-
legal ? /* @__PURE__ */ (0,
|
|
1643
|
-
/* @__PURE__ */ (0,
|
|
1644
|
-
/* @__PURE__ */ (0,
|
|
1900
|
+
legal ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Divider, {}),
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Group, { justify: "space-between", gap: "sm", wrap: "wrap", className: classNames?.legal, children: typeof legal === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_core25.Text, { size: "sm", c: "dimmed", children: legal }) : legal })
|
|
1645
1903
|
] }) : null
|
|
1646
1904
|
] })
|
|
1647
1905
|
}
|
|
@@ -1649,44 +1907,54 @@ function PublicBrandFooter({
|
|
|
1649
1907
|
}
|
|
1650
1908
|
|
|
1651
1909
|
// src/AuthShell.tsx
|
|
1652
|
-
var
|
|
1653
|
-
var
|
|
1910
|
+
var import_core26 = require("@mantine/core");
|
|
1911
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1654
1912
|
function AuthShell({
|
|
1655
1913
|
title,
|
|
1656
1914
|
description,
|
|
1915
|
+
intent = "sign-in",
|
|
1657
1916
|
brand,
|
|
1658
1917
|
headerActions,
|
|
1659
1918
|
footer,
|
|
1660
1919
|
helper,
|
|
1920
|
+
error,
|
|
1921
|
+
guestAction,
|
|
1922
|
+
supportAction,
|
|
1661
1923
|
socialAuth,
|
|
1662
1924
|
dividerLabel = "Or continue with your account",
|
|
1663
1925
|
children
|
|
1664
1926
|
}) {
|
|
1665
|
-
return /* @__PURE__ */ (0,
|
|
1666
|
-
brand || headerActions ? /* @__PURE__ */ (0,
|
|
1667
|
-
brand ? /* @__PURE__ */ (0,
|
|
1668
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
1927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Box, { py: { base: "xl", md: "4rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Container, { size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core26.Stack, { gap: "xl", children: [
|
|
1928
|
+
brand || headerActions ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core26.Group, { justify: brand && headerActions ? "space-between" : "center", align: "center", children: [
|
|
1929
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Box, { children: brand }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Box, {}),
|
|
1930
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Group, { gap: "sm", children: headerActions }) : null
|
|
1669
1931
|
] }) : null,
|
|
1670
|
-
/* @__PURE__ */ (0,
|
|
1671
|
-
/* @__PURE__ */ (0,
|
|
1672
|
-
/* @__PURE__ */ (0,
|
|
1673
|
-
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Card, { withBorder: true, radius: "lg", padding: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core26.Stack, { gap: "lg", children: [
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core26.Stack, { gap: "xs", ta: "center", children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Group, { justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Badge, { variant: "light", color: intent === "account-linking" ? "blue" : intent === "guest-entry" ? "gray" : "teal", children: intent.replace("-", " ") }) }),
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Title, { order: 2, children: title }),
|
|
1936
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Text, { c: "dimmed", size: "sm", children: description }) : null
|
|
1674
1937
|
] }),
|
|
1675
|
-
|
|
1676
|
-
socialAuth ? /* @__PURE__ */ (0,
|
|
1938
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Alert, { color: "red", variant: "light", role: "alert", children: error }) : null,
|
|
1939
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Box, { children: socialAuth }) : null,
|
|
1940
|
+
socialAuth ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Divider, { label: dividerLabel, labelPosition: "center" }) : null,
|
|
1677
1941
|
children,
|
|
1678
|
-
|
|
1942
|
+
guestAction || supportAction ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core26.Group, { justify: "center", gap: "sm", children: [
|
|
1943
|
+
guestAction,
|
|
1944
|
+
supportAction
|
|
1945
|
+
] }) : null,
|
|
1946
|
+
helper ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Text, { size: "sm", c: "dimmed", ta: "center", children: helper }) : null
|
|
1679
1947
|
] }) }),
|
|
1680
|
-
footer ? /* @__PURE__ */ (0,
|
|
1948
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core26.Text, { size: "sm", c: "dimmed", ta: "center", children: footer }) : null
|
|
1681
1949
|
] }) }) });
|
|
1682
1950
|
}
|
|
1683
1951
|
|
|
1684
1952
|
// src/SocialAuthButtons.tsx
|
|
1685
|
-
var
|
|
1953
|
+
var import_core28 = require("@mantine/core");
|
|
1686
1954
|
|
|
1687
1955
|
// src/ProviderIdentityButtons.tsx
|
|
1688
|
-
var
|
|
1689
|
-
var
|
|
1956
|
+
var import_core27 = require("@mantine/core");
|
|
1957
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1690
1958
|
var PROVIDER_IDENTITY_REGISTRY = {
|
|
1691
1959
|
google: {
|
|
1692
1960
|
providerLabel: "Google",
|
|
@@ -1776,17 +2044,31 @@ function mapVariant(variant = "neutral") {
|
|
|
1776
2044
|
function getProviderIdentityLabel(provider, fallbackOverride) {
|
|
1777
2045
|
return resolveProviderLabel(provider, fallbackOverride);
|
|
1778
2046
|
}
|
|
2047
|
+
function getSupportedProviderIdentityIds() {
|
|
2048
|
+
return Object.keys(PROVIDER_IDENTITY_REGISTRY);
|
|
2049
|
+
}
|
|
2050
|
+
function getProviderIdentityPolicy(provider) {
|
|
2051
|
+
const meta = getProviderIdentityMeta(provider);
|
|
2052
|
+
return {
|
|
2053
|
+
id: meta.id,
|
|
2054
|
+
supported: meta.supported,
|
|
2055
|
+
providerLabel: meta.providerLabel,
|
|
2056
|
+
colorAuthority: meta.supported ? "provider" : "gds-neutral",
|
|
2057
|
+
minTouchTargetPx: 44,
|
|
2058
|
+
allowedVariants: ["solid", "outline", "neutral"]
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
1779
2061
|
function ProviderIdentityMark({ provider }) {
|
|
1780
2062
|
const meta = getProviderIdentityMeta(provider);
|
|
1781
|
-
return /* @__PURE__ */ (0,
|
|
1782
|
-
|
|
2063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2064
|
+
import_core27.ThemeIcon,
|
|
1783
2065
|
{
|
|
1784
2066
|
variant: "light",
|
|
1785
2067
|
color: meta.brandColor,
|
|
1786
2068
|
radius: "xl",
|
|
1787
2069
|
size: "md",
|
|
1788
2070
|
"aria-hidden": "true",
|
|
1789
|
-
children: /* @__PURE__ */ (0,
|
|
2071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { size: "xs", fw: 700, c: "inherit", children: meta.markLabel })
|
|
1790
2072
|
}
|
|
1791
2073
|
);
|
|
1792
2074
|
}
|
|
@@ -1794,10 +2076,13 @@ function ProviderIdentityButton({
|
|
|
1794
2076
|
provider,
|
|
1795
2077
|
label,
|
|
1796
2078
|
description,
|
|
2079
|
+
policyNote,
|
|
2080
|
+
error,
|
|
1797
2081
|
href,
|
|
1798
2082
|
onClick,
|
|
1799
2083
|
disabled,
|
|
1800
2084
|
loading,
|
|
2085
|
+
tenantDisabledReason,
|
|
1801
2086
|
fullWidth = true,
|
|
1802
2087
|
size = "md",
|
|
1803
2088
|
variant = "neutral",
|
|
@@ -1807,14 +2092,15 @@ function ProviderIdentityButton({
|
|
|
1807
2092
|
}) {
|
|
1808
2093
|
const meta = getProviderIdentityMeta(provider);
|
|
1809
2094
|
const buttonLabel = resolveProviderLabel(provider, label);
|
|
2095
|
+
const resolvedDisabled = disabled || Boolean(tenantDisabledReason);
|
|
1810
2096
|
const buttonProps = href ? {
|
|
1811
2097
|
component: "a",
|
|
1812
2098
|
href
|
|
1813
2099
|
} : {
|
|
1814
2100
|
onClick
|
|
1815
2101
|
};
|
|
1816
|
-
return /* @__PURE__ */ (0,
|
|
1817
|
-
|
|
2102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2103
|
+
import_core27.Button,
|
|
1818
2104
|
{
|
|
1819
2105
|
variant: mapVariant(variant),
|
|
1820
2106
|
color: variant === "solid" ? meta.brandColor : void 0,
|
|
@@ -1823,14 +2109,17 @@ function ProviderIdentityButton({
|
|
|
1823
2109
|
size,
|
|
1824
2110
|
"aria-label": ariaLabel ?? (typeof buttonLabel === "string" ? buttonLabel : void 0),
|
|
1825
2111
|
"aria-describedby": describedBy,
|
|
1826
|
-
leftSection: /* @__PURE__ */ (0,
|
|
1827
|
-
disabled,
|
|
2112
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ProviderIdentityMark, { provider }),
|
|
2113
|
+
disabled: resolvedDisabled,
|
|
1828
2114
|
loading,
|
|
1829
2115
|
styles: { root: { minHeight: minTouchTargetPx } },
|
|
1830
2116
|
...buttonProps,
|
|
1831
|
-
children: /* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1833
|
-
description ? /* @__PURE__ */ (0,
|
|
2117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core27.Stack, { gap: 0, align: "flex-start", children: [
|
|
2118
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { inherit: true, children: buttonLabel }),
|
|
2119
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { size: "xs", c: "dimmed", lh: 1.2, children: description }) : null,
|
|
2120
|
+
policyNote ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { size: "xs", c: "dimmed", lh: 1.2, children: policyNote }) : null,
|
|
2121
|
+
tenantDisabledReason ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { size: "xs", c: "orange.7", lh: 1.2, children: tenantDisabledReason }) : null,
|
|
2122
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Text, { size: "xs", c: "red.7", lh: 1.2, role: "alert", children: error }) : null
|
|
1834
2123
|
] })
|
|
1835
2124
|
}
|
|
1836
2125
|
);
|
|
@@ -1841,16 +2130,16 @@ function ProviderIdentityButtonGroup({ providers, layout = "stack" }) {
|
|
|
1841
2130
|
}
|
|
1842
2131
|
const content = providers.map((entry, index) => {
|
|
1843
2132
|
const key = `${normalizeProviderId(String(entry.provider)) || "provider"}-${index}`;
|
|
1844
|
-
return /* @__PURE__ */ (0,
|
|
2133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ProviderIdentityButton, { ...entry }, key);
|
|
1845
2134
|
});
|
|
1846
2135
|
if (layout === "grid") {
|
|
1847
|
-
return /* @__PURE__ */ (0,
|
|
2136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "sm", children: content });
|
|
1848
2137
|
}
|
|
1849
|
-
return /* @__PURE__ */ (0,
|
|
2138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core27.Stack, { gap: "sm", children: content });
|
|
1850
2139
|
}
|
|
1851
2140
|
|
|
1852
2141
|
// src/SocialAuthButtons.tsx
|
|
1853
|
-
var
|
|
2142
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1854
2143
|
function SocialAuthButtons({
|
|
1855
2144
|
providers,
|
|
1856
2145
|
title = "Continue with a trusted provider",
|
|
@@ -1865,60 +2154,63 @@ function SocialAuthButtons({
|
|
|
1865
2154
|
provider: provider.id,
|
|
1866
2155
|
label: provider.label,
|
|
1867
2156
|
description: provider.description,
|
|
2157
|
+
policyNote: provider.policyNote,
|
|
2158
|
+
error: provider.error,
|
|
1868
2159
|
href: provider.href,
|
|
1869
2160
|
onClick: provider.onClick,
|
|
1870
2161
|
disabled: provider.disabled,
|
|
1871
2162
|
loading: provider.loading,
|
|
2163
|
+
tenantDisabledReason: provider.tenantDisabledReason,
|
|
1872
2164
|
size: provider.size ?? (compact ? "sm" : "md"),
|
|
1873
2165
|
variant: provider.variant
|
|
1874
2166
|
}));
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
-
/* @__PURE__ */ (0,
|
|
1877
|
-
/* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
2167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core28.Stack, { gap: "md", children: [
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core28.Stack, { gap: 4, ta: "center", children: [
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core28.Group, { justify: "center", gap: "xs", children: [
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(GdsIcons.Login, { size: "1rem" }),
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core28.Text, { fw: 600, children: title })
|
|
1880
2172
|
] }),
|
|
1881
|
-
description ? /* @__PURE__ */ (0,
|
|
2173
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core28.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
1882
2174
|
] }),
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core28.Divider, {}),
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ProviderIdentityButtonGroup, { providers: buttons, layout })
|
|
1885
2177
|
] });
|
|
1886
2178
|
}
|
|
1887
2179
|
|
|
1888
2180
|
// src/ArticleShell.tsx
|
|
1889
|
-
var
|
|
1890
|
-
var
|
|
2181
|
+
var import_core29 = require("@mantine/core");
|
|
2182
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1891
2183
|
function ArticleShell({ eyebrow, title, lead, meta, sideRail, children }) {
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1895
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
1897
|
-
lead ? /* @__PURE__ */ (0,
|
|
1898
|
-
meta ? /* @__PURE__ */ (0,
|
|
2184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Container, { size: "lg", py: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core29.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core29.Stack, { gap: "lg", maw: 760, flex: 1, children: [
|
|
2186
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core29.Stack, { gap: "sm", children: [
|
|
2187
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Text, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2188
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Title, { order: 1, children: title }),
|
|
2189
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
2190
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Group, { gap: "md", children: meta }) : null
|
|
1899
2191
|
] }),
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Stack, { gap: "md", children })
|
|
1901
2193
|
] }),
|
|
1902
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
2194
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core29.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1903
2195
|
] }) });
|
|
1904
2196
|
}
|
|
1905
2197
|
|
|
1906
2198
|
// src/CtaButtonGroup.tsx
|
|
1907
|
-
var
|
|
1908
|
-
var
|
|
2199
|
+
var import_core30 = require("@mantine/core");
|
|
2200
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1909
2201
|
function CtaButtonGroup({ primary, secondary, tertiary }) {
|
|
1910
|
-
return /* @__PURE__ */ (0,
|
|
1911
|
-
/* @__PURE__ */ (0,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1913
|
-
secondary ? /* @__PURE__ */ (0,
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core30.Stack, { gap: "sm", children: [
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core30.Group, { gap: "sm", align: "stretch", children: [
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: primary }),
|
|
2205
|
+
secondary ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: secondary }) : null
|
|
1914
2206
|
] }),
|
|
1915
|
-
tertiary ? /* @__PURE__ */ (0,
|
|
2207
|
+
tertiary ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: tertiary }) : null
|
|
1916
2208
|
] });
|
|
1917
2209
|
}
|
|
1918
2210
|
|
|
1919
2211
|
// src/DocsPageShell.tsx
|
|
1920
|
-
var
|
|
1921
|
-
var
|
|
2212
|
+
var import_core31 = require("@mantine/core");
|
|
2213
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1922
2214
|
function DocsPageShell({
|
|
1923
2215
|
breadcrumbs = [],
|
|
1924
2216
|
title,
|
|
@@ -1929,27 +2221,27 @@ function DocsPageShell({
|
|
|
1929
2221
|
footerNext,
|
|
1930
2222
|
children
|
|
1931
2223
|
}) {
|
|
1932
|
-
return /* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
breadcrumbs.length ? /* @__PURE__ */ (0,
|
|
1935
|
-
(crumb) => crumb.href ? /* @__PURE__ */ (0,
|
|
2224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Container, { fluid: true, py: "xl", px: { base: "md", md: "lg", lg: "xl" }, w: "100%", maw: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core31.Group, { align: "flex-start", gap: "xl", wrap: "nowrap", children: [
|
|
2225
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core31.Stack, { component: "article", gap: "lg", flex: 1, miw: 0, children: [
|
|
2226
|
+
breadcrumbs.length ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Breadcrumbs, { children: breadcrumbs.map(
|
|
2227
|
+
(crumb) => crumb.href ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Anchor, { href: crumb.href, children: crumb.label }, `${crumb.label}-${crumb.href}`) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Text, { children: crumb.label }, crumb.label)
|
|
1936
2228
|
) }) : null,
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
1939
|
-
/* @__PURE__ */ (0,
|
|
1940
|
-
lead ? /* @__PURE__ */ (0,
|
|
1941
|
-
meta ? /* @__PURE__ */ (0,
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_core31.Stack, { gap: "sm", children: [
|
|
2230
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Text, { size: "sm", fw: 700, c: "dimmed", children: eyebrow }) : null,
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Title, { order: 1, children: title }),
|
|
2232
|
+
lead ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Text, { size: "lg", c: "dimmed", children: lead }) : null,
|
|
2233
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Group, { gap: "md", children: meta }) : null
|
|
1942
2234
|
] }),
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
1944
|
-
footerNext ? /* @__PURE__ */ (0,
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Stack, { gap: "md", children }),
|
|
2236
|
+
footerNext ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Anchor, { href: footerNext.href, fw: 600, children: footerNext.label }) : null
|
|
1945
2237
|
] }),
|
|
1946
|
-
sideRail ? /* @__PURE__ */ (0,
|
|
2238
|
+
sideRail ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_core31.Stack, { visibleFrom: "lg", gap: "md", w: 240, children: sideRail }) : null
|
|
1947
2239
|
] }) });
|
|
1948
2240
|
}
|
|
1949
2241
|
|
|
1950
2242
|
// src/EditorialHero.tsx
|
|
1951
|
-
var
|
|
1952
|
-
var
|
|
2243
|
+
var import_core32 = require("@mantine/core");
|
|
2244
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1953
2245
|
function resolveActionVariant(action, index, seenPrimary) {
|
|
1954
2246
|
const requested = action.variant ?? (index === 0 ? "primary" : "secondary");
|
|
1955
2247
|
if (requested === "primary" && !seenPrimary) {
|
|
@@ -1961,8 +2253,8 @@ function resolveActionVariant(action, index, seenPrimary) {
|
|
|
1961
2253
|
return { variant: "default", seenPrimary };
|
|
1962
2254
|
}
|
|
1963
2255
|
function HeroAction({ action, variant }) {
|
|
1964
|
-
const content = /* @__PURE__ */ (0,
|
|
1965
|
-
|
|
2256
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2257
|
+
import_core32.Anchor,
|
|
1966
2258
|
{
|
|
1967
2259
|
href: action.href,
|
|
1968
2260
|
onClick: action.onClick,
|
|
@@ -1986,8 +2278,8 @@ function HeroAction({ action, variant }) {
|
|
|
1986
2278
|
}
|
|
1987
2279
|
);
|
|
1988
2280
|
if (!action.href) {
|
|
1989
|
-
return /* @__PURE__ */ (0,
|
|
1990
|
-
|
|
2281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2282
|
+
import_core32.Box,
|
|
1991
2283
|
{
|
|
1992
2284
|
component: "button",
|
|
1993
2285
|
type: "button",
|
|
@@ -2014,30 +2306,30 @@ function HeroAction({ action, variant }) {
|
|
|
2014
2306
|
return content;
|
|
2015
2307
|
}
|
|
2016
2308
|
function LoadingHero({ compact }) {
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Paper, { withBorder: true, radius: "xl", p: compact ? "lg" : "xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Stack, { gap: "md", children: [
|
|
2311
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 16, width: 96, radius: "xl" }),
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 48, width: "90%", radius: "md" }),
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 18, width: "100%", radius: "md" }),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 18, width: "82%", radius: "md" }),
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Group, { children: [
|
|
2316
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 40, width: 140, radius: "md" }),
|
|
2317
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { height: 40, width: 140, radius: "md" })
|
|
2026
2318
|
] })
|
|
2027
2319
|
] }) }),
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Skeleton, { radius: "lg" }) }) })
|
|
2029
2321
|
] }) });
|
|
2030
2322
|
}
|
|
2031
2323
|
function MediaFallback() {
|
|
2032
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
-
|
|
2324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.AspectRatio, { ratio: 16 / 11, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2325
|
+
import_core32.ThemeIcon,
|
|
2034
2326
|
{
|
|
2035
2327
|
size: "100%",
|
|
2036
2328
|
radius: "lg",
|
|
2037
2329
|
color: "gray",
|
|
2038
2330
|
variant: "light",
|
|
2039
2331
|
"aria-label": "Hero media is unavailable",
|
|
2040
|
-
children: /* @__PURE__ */ (0,
|
|
2332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(GdsIcons.Gallery, { size: "2.5rem" })
|
|
2041
2333
|
}
|
|
2042
2334
|
) });
|
|
2043
2335
|
}
|
|
@@ -2057,8 +2349,8 @@ function MediaFrame({
|
|
|
2057
2349
|
} else if (mediaFade === "soft-start") {
|
|
2058
2350
|
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%)";
|
|
2059
2351
|
}
|
|
2060
|
-
return /* @__PURE__ */ (0,
|
|
2061
|
-
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2353
|
+
import_core32.Box,
|
|
2062
2354
|
{
|
|
2063
2355
|
component: "figure",
|
|
2064
2356
|
m: 0,
|
|
@@ -2071,9 +2363,9 @@ function MediaFrame({
|
|
|
2071
2363
|
},
|
|
2072
2364
|
"aria-label": mediaAlt,
|
|
2073
2365
|
children: [
|
|
2074
|
-
media ?? /* @__PURE__ */ (0,
|
|
2075
|
-
media && overlayBackground ? /* @__PURE__ */ (0,
|
|
2076
|
-
|
|
2366
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MediaFallback, {}),
|
|
2367
|
+
media && overlayBackground ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2368
|
+
import_core32.Box,
|
|
2077
2369
|
{
|
|
2078
2370
|
"aria-hidden": true,
|
|
2079
2371
|
style: {
|
|
@@ -2106,7 +2398,7 @@ function EditorialHero({
|
|
|
2106
2398
|
classNames
|
|
2107
2399
|
}) {
|
|
2108
2400
|
if (loading) {
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoadingHero, { compact });
|
|
2110
2402
|
}
|
|
2111
2403
|
const stackAlign = align === "center" ? "center" : "flex-start";
|
|
2112
2404
|
const textAlign = align === "center" ? "center" : "left";
|
|
@@ -2114,15 +2406,15 @@ function EditorialHero({
|
|
|
2114
2406
|
const renderedActions = actions.slice(0, 3).map((action, index) => {
|
|
2115
2407
|
const resolved = resolveActionVariant(action, index, seenPrimary);
|
|
2116
2408
|
seenPrimary = resolved.seenPrimary;
|
|
2117
|
-
return /* @__PURE__ */ (0,
|
|
2409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HeroAction, { action, variant: resolved.variant }, `${action.label}-${index}`);
|
|
2118
2410
|
});
|
|
2119
|
-
const textSlot = /* @__PURE__ */ (0,
|
|
2120
|
-
/* @__PURE__ */ (0,
|
|
2121
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
2123
|
-
description ? /* @__PURE__ */ (0,
|
|
2411
|
+
const textSlot = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Stack, { gap: compact ? "md" : "lg", justify: "center", h: "100%", className: classNames?.content, children: [
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Stack, { gap: "sm", align: stackAlign, children: [
|
|
2413
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Text, { size: "sm", fw: 700, c: "dimmed", ta: textAlign, children: eyebrow }) : null,
|
|
2414
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Title, { order: 1, maw: 760, ta: textAlign, children: title }),
|
|
2415
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Text, { size: compact ? "md" : "lg", c: "dimmed", maw: 720, ta: textAlign, children: description }) : null
|
|
2124
2416
|
] }),
|
|
2125
|
-
renderedActions.length ? /* @__PURE__ */ (0,
|
|
2417
|
+
renderedActions.length ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Box, { className: classNames?.actions, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2126
2418
|
CtaButtonGroup,
|
|
2127
2419
|
{
|
|
2128
2420
|
primary: renderedActions[0],
|
|
@@ -2130,8 +2422,8 @@ function EditorialHero({
|
|
|
2130
2422
|
tertiary: renderedActions[2]
|
|
2131
2423
|
}
|
|
2132
2424
|
) }) : null,
|
|
2133
|
-
meta.length ? /* @__PURE__ */ (0,
|
|
2134
|
-
|
|
2425
|
+
meta.length ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Group, { gap: "sm", wrap: "wrap", "aria-label": "Supporting details", className: classNames?.meta, children: meta.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2426
|
+
import_core32.Group,
|
|
2135
2427
|
{
|
|
2136
2428
|
gap: 6,
|
|
2137
2429
|
px: "sm",
|
|
@@ -2142,17 +2434,17 @@ function EditorialHero({
|
|
|
2142
2434
|
},
|
|
2143
2435
|
children: [
|
|
2144
2436
|
item.icon,
|
|
2145
|
-
/* @__PURE__ */ (0,
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Text, { size: "sm", c: "dimmed", children: item.label })
|
|
2146
2438
|
]
|
|
2147
2439
|
},
|
|
2148
2440
|
item.id
|
|
2149
2441
|
)) }) : null
|
|
2150
2442
|
] });
|
|
2151
|
-
const mediaSlot = error ? /* @__PURE__ */ (0,
|
|
2152
|
-
const textCol = /* @__PURE__ */ (0,
|
|
2153
|
-
const mediaCol = /* @__PURE__ */ (0,
|
|
2154
|
-
return /* @__PURE__ */ (0,
|
|
2155
|
-
|
|
2443
|
+
const mediaSlot = error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccentPanel, { tone: "red", variant: "soft-outline", title: "Media unavailable", children: error }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MediaFrame, { media, mediaAlt, mediaFade, className: classNames?.media });
|
|
2444
|
+
const textCol = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 1, md: mediaPosition === "left" ? 2 : 1 }, children: textSlot });
|
|
2445
|
+
const mediaCol = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_core32.Grid.Col, { span: { base: 12, md: 6 }, order: { base: 2, md: mediaPosition === "left" ? 1 : 2 }, children: mediaSlot });
|
|
2446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2447
|
+
import_core32.Paper,
|
|
2156
2448
|
{
|
|
2157
2449
|
component: "section",
|
|
2158
2450
|
withBorder: true,
|
|
@@ -2160,7 +2452,7 @@ function EditorialHero({
|
|
|
2160
2452
|
p: compact ? "lg" : "xl",
|
|
2161
2453
|
className: classNames?.root,
|
|
2162
2454
|
style: surfaceVariant === "flat-public" ? { boxShadow: "none" } : void 0,
|
|
2163
|
-
children: /* @__PURE__ */ (0,
|
|
2455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core32.Grid, { gutter: compact ? "lg" : "xl", align: "center", children: [
|
|
2164
2456
|
textCol,
|
|
2165
2457
|
mediaCol
|
|
2166
2458
|
] })
|
|
@@ -2169,19 +2461,19 @@ function EditorialHero({
|
|
|
2169
2461
|
}
|
|
2170
2462
|
|
|
2171
2463
|
// src/FeatureBand.tsx
|
|
2172
|
-
var
|
|
2173
|
-
var
|
|
2464
|
+
var import_core33 = require("@mantine/core");
|
|
2465
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2174
2466
|
function FeatureBandSkeleton({
|
|
2175
2467
|
columns = 3,
|
|
2176
2468
|
bordered = true,
|
|
2177
2469
|
variant = "default"
|
|
2178
2470
|
}) {
|
|
2179
|
-
return /* @__PURE__ */ (0,
|
|
2180
|
-
/* @__PURE__ */ (0,
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2184
|
-
/* @__PURE__ */ (0,
|
|
2471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Skeleton, { height: variant === "process" ? 28 : 42, width: variant === "process" ? 72 : 42, radius: "xl" }),
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core33.Stack, { gap: "xs", children: [
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Skeleton, { height: 20, width: "75%", radius: "md" }),
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Skeleton, { height: 14, width: "100%", radius: "md" }),
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Skeleton, { height: 14, width: "82%", radius: "md" })
|
|
2185
2477
|
] })
|
|
2186
2478
|
] }) }, index)) });
|
|
2187
2479
|
}
|
|
@@ -2194,10 +2486,10 @@ function FeatureBand({
|
|
|
2194
2486
|
variant = "default"
|
|
2195
2487
|
}) {
|
|
2196
2488
|
if (loading) {
|
|
2197
|
-
return /* @__PURE__ */ (0,
|
|
2489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FeatureBandSkeleton, { columns, bordered, variant });
|
|
2198
2490
|
}
|
|
2199
2491
|
if (!items.length) {
|
|
2200
|
-
return emptyState ? /* @__PURE__ */ (0,
|
|
2492
|
+
return emptyState ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: emptyState }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2201
2493
|
EmptyState,
|
|
2202
2494
|
{
|
|
2203
2495
|
title: "No supporting details available",
|
|
@@ -2205,9 +2497,9 @@ function FeatureBand({
|
|
|
2205
2497
|
}
|
|
2206
2498
|
);
|
|
2207
2499
|
}
|
|
2208
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
-
variant === "process" ? /* @__PURE__ */ (0,
|
|
2210
|
-
|
|
2500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Box, { component: "section", "aria-label": "Supporting features", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.SimpleGrid, { cols: { base: 1, sm: Math.min(columns, 2), lg: columns }, spacing: "lg", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Paper, { withBorder: bordered, radius: "lg", p: variant === "compact" ? "md" : "lg", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core33.Stack, { gap: "md", children: [
|
|
2501
|
+
variant === "process" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2502
|
+
import_core33.Text,
|
|
2211
2503
|
{
|
|
2212
2504
|
fw: 800,
|
|
2213
2505
|
size: "sm",
|
|
@@ -2219,31 +2511,31 @@ function FeatureBand({
|
|
|
2219
2511
|
},
|
|
2220
2512
|
children: item.stepLabel ?? `Step ${index + 1}`
|
|
2221
2513
|
}
|
|
2222
|
-
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0,
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2225
|
-
item.description ? /* @__PURE__ */ (0,
|
|
2226
|
-
item.meta ? /* @__PURE__ */ (0,
|
|
2514
|
+
) }) : item.media ? item.media : item.icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "violet", children: item.icon }) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.ThemeIcon, { size: "xl", radius: "xl", variant: "light", color: "gray", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(GdsIcons.Info, { size: "1.25rem" }) }) }),
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_core33.Stack, { gap: "xs", children: [
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Title, { order: 4, children: item.title }),
|
|
2517
|
+
item.description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Text, { c: "dimmed", children: item.description }) : null,
|
|
2518
|
+
item.meta ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_core33.Text, { size: "sm", c: "dimmed", children: item.meta }) : null
|
|
2227
2519
|
] })
|
|
2228
2520
|
] }) }, item.id)) }) });
|
|
2229
2521
|
}
|
|
2230
2522
|
|
|
2231
2523
|
// src/MapPanel.tsx
|
|
2232
|
-
var
|
|
2524
|
+
var import_core35 = require("@mantine/core");
|
|
2233
2525
|
|
|
2234
2526
|
// src/ActionBar.tsx
|
|
2235
|
-
var
|
|
2236
|
-
var
|
|
2527
|
+
var import_core34 = require("@mantine/core");
|
|
2528
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2237
2529
|
function renderSemanticAction(action, slot, vocabularyPacks) {
|
|
2238
2530
|
const { action: actionId, variant, ariaLabel, ...props } = action;
|
|
2239
2531
|
const fallbackVariant = slot === "primary" ? "filled" : slot === "secondary" ? "default" : "subtle";
|
|
2240
2532
|
const config = resolveSemanticActionConfig(actionId, vocabularyPacks);
|
|
2241
2533
|
const Icon = config.icon;
|
|
2242
2534
|
const label = getSemanticActionLabel(actionId, void 0, vocabularyPacks);
|
|
2243
|
-
return /* @__PURE__ */ (0,
|
|
2244
|
-
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2536
|
+
import_core34.Button,
|
|
2245
2537
|
{
|
|
2246
|
-
leftSection: /* @__PURE__ */ (0,
|
|
2538
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { size: "1rem", stroke: 1.75 }),
|
|
2247
2539
|
"aria-label": ariaLabel ?? label,
|
|
2248
2540
|
variant: variant ?? fallbackVariant,
|
|
2249
2541
|
...props,
|
|
@@ -2260,23 +2552,23 @@ function ActionBar({
|
|
|
2260
2552
|
gap = "sm",
|
|
2261
2553
|
vocabularyPacks = []
|
|
2262
2554
|
}) {
|
|
2263
|
-
return /* @__PURE__ */ (0,
|
|
2264
|
-
/* @__PURE__ */ (0,
|
|
2555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_core34.Stack, { gap, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core34.Group, { justify: "space-between", align: "center", gap, wrap: "wrap", children: [
|
|
2556
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core34.Group, { gap, wrap: "wrap", children: [
|
|
2265
2557
|
secondary.map((action) => renderSemanticAction(action, "secondary", vocabularyPacks)),
|
|
2266
2558
|
tertiary.map((action) => renderSemanticAction(action, "tertiary", vocabularyPacks))
|
|
2267
2559
|
] }),
|
|
2268
|
-
/* @__PURE__ */ (0,
|
|
2560
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_core34.Group, { gap, wrap: "wrap", justify: "flex-end", style: { marginInlineStart: "auto" }, children: [
|
|
2269
2561
|
iconOnly.map(({ action, ariaLabel, ...props }) => {
|
|
2270
2562
|
const config = resolveSemanticActionConfig(action, vocabularyPacks);
|
|
2271
2563
|
const Icon = config.icon;
|
|
2272
|
-
return /* @__PURE__ */ (0,
|
|
2273
|
-
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2565
|
+
import_core34.ActionIcon,
|
|
2274
2566
|
{
|
|
2275
2567
|
variant: "subtle",
|
|
2276
2568
|
size: "lg",
|
|
2277
2569
|
"aria-label": ariaLabel ?? getSemanticActionLabel(action, void 0, vocabularyPacks),
|
|
2278
2570
|
...props,
|
|
2279
|
-
children: /* @__PURE__ */ (0,
|
|
2571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { size: "1rem", stroke: 1.75 })
|
|
2280
2572
|
},
|
|
2281
2573
|
`icon-${action}`
|
|
2282
2574
|
);
|
|
@@ -2287,7 +2579,7 @@ function ActionBar({
|
|
|
2287
2579
|
}
|
|
2288
2580
|
|
|
2289
2581
|
// src/MapPanel.tsx
|
|
2290
|
-
var
|
|
2582
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2291
2583
|
function MapPanel({
|
|
2292
2584
|
title,
|
|
2293
2585
|
description,
|
|
@@ -2303,7 +2595,7 @@ function MapPanel({
|
|
|
2303
2595
|
}) {
|
|
2304
2596
|
let body;
|
|
2305
2597
|
if (loading) {
|
|
2306
|
-
body = /* @__PURE__ */ (0,
|
|
2598
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2307
2599
|
StateBlock,
|
|
2308
2600
|
{
|
|
2309
2601
|
variant: "loading",
|
|
@@ -2313,9 +2605,9 @@ function MapPanel({
|
|
|
2313
2605
|
}
|
|
2314
2606
|
);
|
|
2315
2607
|
} else if (error) {
|
|
2316
|
-
body = /* @__PURE__ */ (0,
|
|
2608
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StateBlock, { variant: "error", title: "Map unavailable", description: error, compact: true });
|
|
2317
2609
|
} else if (!iframeSrc && !renderMap) {
|
|
2318
|
-
body = /* @__PURE__ */ (0,
|
|
2610
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2319
2611
|
StateBlock,
|
|
2320
2612
|
{
|
|
2321
2613
|
variant: "empty",
|
|
@@ -2325,9 +2617,9 @@ function MapPanel({
|
|
|
2325
2617
|
}
|
|
2326
2618
|
);
|
|
2327
2619
|
} else if (renderMap) {
|
|
2328
|
-
body = /* @__PURE__ */ (0,
|
|
2620
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core35.Box, { style: { minHeight }, children: renderMap() });
|
|
2329
2621
|
} else {
|
|
2330
|
-
body = /* @__PURE__ */ (0,
|
|
2622
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core35.AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2331
2623
|
"iframe",
|
|
2332
2624
|
{
|
|
2333
2625
|
src: iframeSrc,
|
|
@@ -2339,21 +2631,21 @@ function MapPanel({
|
|
|
2339
2631
|
}
|
|
2340
2632
|
) });
|
|
2341
2633
|
}
|
|
2342
|
-
return /* @__PURE__ */ (0,
|
|
2343
|
-
/* @__PURE__ */ (0,
|
|
2344
|
-
/* @__PURE__ */ (0,
|
|
2345
|
-
/* @__PURE__ */ (0,
|
|
2346
|
-
description ? /* @__PURE__ */ (0,
|
|
2634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core35.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core35.Stack, { gap: "md", children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core35.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core35.Stack, { gap: 4, children: [
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core35.Title, { order: 3, children: title }),
|
|
2638
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core35.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
2347
2639
|
] }),
|
|
2348
|
-
actions ? /* @__PURE__ */ (0,
|
|
2640
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ActionBar, { ...actions }) : null
|
|
2349
2641
|
] }),
|
|
2350
2642
|
body
|
|
2351
2643
|
] }) });
|
|
2352
2644
|
}
|
|
2353
2645
|
|
|
2354
2646
|
// src/PublicFlowShell.tsx
|
|
2355
|
-
var
|
|
2356
|
-
var
|
|
2647
|
+
var import_core36 = require("@mantine/core");
|
|
2648
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2357
2649
|
var stageTone = {
|
|
2358
2650
|
idle: { label: "Idle", color: "gray" },
|
|
2359
2651
|
loading: { label: "Loading", color: "blue" },
|
|
@@ -2405,7 +2697,7 @@ function PublicFlowShell({
|
|
|
2405
2697
|
const actionBar = toActionBar(stage.actions);
|
|
2406
2698
|
let body = stage.body;
|
|
2407
2699
|
if (stage.status === "loading") {
|
|
2408
|
-
body = /* @__PURE__ */ (0,
|
|
2700
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2409
2701
|
StateBlock,
|
|
2410
2702
|
{
|
|
2411
2703
|
variant: "loading",
|
|
@@ -2414,7 +2706,7 @@ function PublicFlowShell({
|
|
|
2414
2706
|
}
|
|
2415
2707
|
);
|
|
2416
2708
|
} else if (stage.status === "error") {
|
|
2417
|
-
body = errorState ?? /* @__PURE__ */ (0,
|
|
2709
|
+
body = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2418
2710
|
StateBlock,
|
|
2419
2711
|
{
|
|
2420
2712
|
variant: "error",
|
|
@@ -2423,7 +2715,7 @@ function PublicFlowShell({
|
|
|
2423
2715
|
}
|
|
2424
2716
|
);
|
|
2425
2717
|
} else if (!stage.body && !hardwareSurface) {
|
|
2426
|
-
body = emptyState ?? /* @__PURE__ */ (0,
|
|
2718
|
+
body = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2427
2719
|
EmptyState,
|
|
2428
2720
|
{
|
|
2429
2721
|
title: "No stage content available",
|
|
@@ -2431,29 +2723,29 @@ function PublicFlowShell({
|
|
|
2431
2723
|
}
|
|
2432
2724
|
);
|
|
2433
2725
|
}
|
|
2434
|
-
return /* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2437
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2439
|
-
/* @__PURE__ */ (0,
|
|
2440
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core36.Stack, { gap: "lg", children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core36.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core36.Stack, { gap: 4, children: [
|
|
2729
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Text, { size: "xs", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_core36.Group, { gap: "sm", wrap: "wrap", children: [
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Title, { order: 2, children: stage.title }),
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Badge, { variant: "light", color: tone.color, children: tone.label })
|
|
2441
2733
|
] }),
|
|
2442
|
-
stage.description ? /* @__PURE__ */ (0,
|
|
2734
|
+
stage.description ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Text, { size: "sm", c: "dimmed", children: stage.description }) : null
|
|
2443
2735
|
] }),
|
|
2444
2736
|
exitAction
|
|
2445
2737
|
] }),
|
|
2446
|
-
stage.notice ? /* @__PURE__ */ (0,
|
|
2738
|
+
stage.notice ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_core36.Text, { size: "sm", c: "dimmed", children: stage.notice }) : null,
|
|
2447
2739
|
body,
|
|
2448
2740
|
hardwareSurface,
|
|
2449
2741
|
stage.aside,
|
|
2450
|
-
actionBar ? /* @__PURE__ */ (0,
|
|
2742
|
+
actionBar ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ActionBar, { ...actionBar }) : null
|
|
2451
2743
|
] }) });
|
|
2452
2744
|
}
|
|
2453
2745
|
|
|
2454
2746
|
// src/PlaybackSurface.tsx
|
|
2455
|
-
var
|
|
2456
|
-
var
|
|
2747
|
+
var import_core37 = require("@mantine/core");
|
|
2748
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2457
2749
|
var stateTone = {
|
|
2458
2750
|
loading: { label: "Loading", color: "blue" },
|
|
2459
2751
|
ready: { label: "Ready", color: "teal" },
|
|
@@ -2476,7 +2768,7 @@ function PlaybackSurface({
|
|
|
2476
2768
|
const tone = stateTone[state];
|
|
2477
2769
|
let content;
|
|
2478
2770
|
if (state === "loading") {
|
|
2479
|
-
content = /* @__PURE__ */ (0,
|
|
2771
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2480
2772
|
StateBlock,
|
|
2481
2773
|
{
|
|
2482
2774
|
variant: "loading",
|
|
@@ -2485,7 +2777,7 @@ function PlaybackSurface({
|
|
|
2485
2777
|
}
|
|
2486
2778
|
);
|
|
2487
2779
|
} else if (state === "empty") {
|
|
2488
|
-
content = emptyState ?? /* @__PURE__ */ (0,
|
|
2780
|
+
content = emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2489
2781
|
EmptyState,
|
|
2490
2782
|
{
|
|
2491
2783
|
title: "No playback content available",
|
|
@@ -2493,7 +2785,7 @@ function PlaybackSurface({
|
|
|
2493
2785
|
}
|
|
2494
2786
|
);
|
|
2495
2787
|
} else if (state === "error") {
|
|
2496
|
-
content = errorState ?? /* @__PURE__ */ (0,
|
|
2788
|
+
content = errorState ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2497
2789
|
StateBlock,
|
|
2498
2790
|
{
|
|
2499
2791
|
variant: "error",
|
|
@@ -2502,23 +2794,23 @@ function PlaybackSurface({
|
|
|
2502
2794
|
}
|
|
2503
2795
|
);
|
|
2504
2796
|
} else {
|
|
2505
|
-
content = /* @__PURE__ */ (0,
|
|
2797
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core37.Stack, { gap: "md", children: [
|
|
2506
2798
|
media,
|
|
2507
2799
|
overlays
|
|
2508
2800
|
] });
|
|
2509
2801
|
}
|
|
2510
|
-
return /* @__PURE__ */ (0,
|
|
2511
|
-
title || statusMessage || controls ? /* @__PURE__ */ (0,
|
|
2512
|
-
/* @__PURE__ */ (0,
|
|
2513
|
-
title ? /* @__PURE__ */ (0,
|
|
2514
|
-
statusMessage ? /* @__PURE__ */ (0,
|
|
2802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core37.Paper, { withBorder: true, radius: "xl", p: "lg", "data-playback-mode": mode, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core37.Stack, { gap: "md", children: [
|
|
2803
|
+
title || statusMessage || controls ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core37.Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "wrap", children: [
|
|
2804
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core37.Stack, { gap: 4, children: [
|
|
2805
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core37.Title, { order: 3, children: title }) : null,
|
|
2806
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core37.Text, { size: "sm", c: "dimmed", children: statusMessage }) : null
|
|
2515
2807
|
] }),
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2517
|
-
/* @__PURE__ */ (0,
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_core37.Group, { gap: "sm", align: "center", wrap: "wrap", children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_core37.Badge, { variant: "light", color: tone.color, children: tone.label }),
|
|
2518
2810
|
controls
|
|
2519
2811
|
] })
|
|
2520
2812
|
] }) : null,
|
|
2521
|
-
state === "degraded" ? /* @__PURE__ */ (0,
|
|
2813
|
+
state === "degraded" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2522
2814
|
StateBlock,
|
|
2523
2815
|
{
|
|
2524
2816
|
variant: "info",
|
|
@@ -2532,28 +2824,35 @@ function PlaybackSurface({
|
|
|
2532
2824
|
}
|
|
2533
2825
|
|
|
2534
2826
|
// src/MediaField.tsx
|
|
2535
|
-
var
|
|
2827
|
+
var import_core39 = require("@mantine/core");
|
|
2536
2828
|
|
|
2537
2829
|
// src/FormField.tsx
|
|
2538
|
-
var
|
|
2539
|
-
var
|
|
2830
|
+
var import_core38 = require("@mantine/core");
|
|
2831
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2540
2832
|
function FormField({ label, description, error, children }) {
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
-
typeof label === "string" ? /* @__PURE__ */ (0,
|
|
2543
|
-
description ? typeof description === "string" ? /* @__PURE__ */ (0,
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core38.Box, { component: "label", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_core38.Stack, { gap: 4, children: [
|
|
2834
|
+
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core38.Text, { size: "xs", fw: 600, c: "dimmed", children: label }) : label,
|
|
2835
|
+
description ? typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core38.Text, { size: "xs", c: "dimmed", children: description }) : description : null,
|
|
2544
2836
|
children,
|
|
2545
|
-
error ? typeof error === "string" ? /* @__PURE__ */ (0,
|
|
2837
|
+
error ? typeof error === "string" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_core38.Text, { size: "xs", c: "red.7", children: error }) : error : null
|
|
2546
2838
|
] }) });
|
|
2547
2839
|
}
|
|
2548
2840
|
|
|
2549
2841
|
// src/MediaField.tsx
|
|
2550
|
-
var
|
|
2842
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2551
2843
|
var stateLabels = {
|
|
2552
2844
|
empty: { label: "Empty", color: "gray" },
|
|
2845
|
+
"drag-active": { label: "Drop to select", color: "violet" },
|
|
2553
2846
|
selected: { label: "Selected", color: "blue" },
|
|
2847
|
+
"preview-loading": { label: "Preview loading", color: "violet" },
|
|
2554
2848
|
saved: { label: "Saved", color: "teal" },
|
|
2555
2849
|
invalid: { label: "Needs attention", color: "red" },
|
|
2556
|
-
uploading: { label: "Uploading", color: "violet" }
|
|
2850
|
+
uploading: { label: "Uploading", color: "violet" },
|
|
2851
|
+
"upload-failed": { label: "Upload failed", color: "red" },
|
|
2852
|
+
"unsupported-type": { label: "Unsupported type", color: "red" },
|
|
2853
|
+
"too-large": { label: "Too large", color: "red" },
|
|
2854
|
+
removed: { label: "Removed", color: "gray" },
|
|
2855
|
+
readonly: { label: "Read only", color: "gray" }
|
|
2557
2856
|
};
|
|
2558
2857
|
function MediaField({
|
|
2559
2858
|
label,
|
|
@@ -2566,41 +2865,60 @@ function MediaField({
|
|
|
2566
2865
|
policyText,
|
|
2567
2866
|
error,
|
|
2568
2867
|
retryAction,
|
|
2868
|
+
replaceAction,
|
|
2569
2869
|
onRemove,
|
|
2570
2870
|
onReset,
|
|
2571
2871
|
removeAction,
|
|
2572
2872
|
resetAction,
|
|
2573
2873
|
statusAction,
|
|
2874
|
+
acceptedTypes,
|
|
2875
|
+
maxSize,
|
|
2876
|
+
progress,
|
|
2877
|
+
readonly = false,
|
|
2574
2878
|
state = "empty",
|
|
2575
2879
|
mode = "stacked"
|
|
2576
2880
|
}) {
|
|
2577
|
-
const
|
|
2578
|
-
const
|
|
2579
|
-
const
|
|
2580
|
-
|
|
2881
|
+
const resolvedState = readonly ? "readonly" : state;
|
|
2882
|
+
const stateBadge = stateLabels[resolvedState];
|
|
2883
|
+
const resolvedRemoveAction = removeAction ?? (!readonly && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Button, { type: "button", variant: "light", color: "red", onClick: onRemove, children: "Remove" }) : null);
|
|
2884
|
+
const resolvedResetAction = resetAction ?? (!readonly && onReset ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Button, { type: "button", variant: "default", onClick: onReset, children: "Reset" }) : null);
|
|
2885
|
+
const boundedProgress = typeof progress === "number" ? Math.max(0, Math.min(100, progress)) : void 0;
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2581
2887
|
FormField,
|
|
2582
2888
|
{
|
|
2583
2889
|
label,
|
|
2584
2890
|
description,
|
|
2585
2891
|
error,
|
|
2586
|
-
children: /* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Stack, { gap: "md", children: [
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Group, { justify: "flex-end", align: "center", gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Group, { gap: "xs", justify: "flex-end", children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Badge, { variant: "light", color: stateBadge.color, children: stateBadge.label }),
|
|
2589
2895
|
statusAction
|
|
2590
2896
|
] }) }),
|
|
2591
2897
|
preview ? preview : null,
|
|
2592
|
-
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2594
|
-
/* @__PURE__ */ (0,
|
|
2898
|
+
typeof boundedProgress === "number" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Stack, { gap: 4, children: [
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Progress, { value: boundedProgress, "aria-label": "Upload progress" }),
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Text, { size: "xs", c: "dimmed", children: [
|
|
2901
|
+
boundedProgress,
|
|
2902
|
+
"% complete"
|
|
2903
|
+
] })
|
|
2904
|
+
] }) : null,
|
|
2905
|
+
(uploadControl || urlInput) && !readonly ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2906
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Divider, {}),
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Stack, { gap: "sm", style: mode === "split" ? { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))" } : void 0, children: [
|
|
2595
2908
|
uploadControl,
|
|
2596
2909
|
urlInput
|
|
2597
2910
|
] })
|
|
2598
2911
|
] }) : null,
|
|
2599
|
-
value ? /* @__PURE__ */ (0,
|
|
2600
|
-
helpText ? /* @__PURE__ */ (0,
|
|
2601
|
-
|
|
2912
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Text, { size: "sm", c: "dimmed", style: { wordBreak: "break-all" }, children: value }) : null,
|
|
2913
|
+
helpText ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Text, { size: "sm", c: "dimmed", children: helpText }) : null,
|
|
2914
|
+
acceptedTypes || maxSize ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Group, { gap: "xs", wrap: "wrap", children: [
|
|
2915
|
+
acceptedTypes ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Badge, { variant: "outline", color: "gray", children: acceptedTypes }) : null,
|
|
2916
|
+
maxSize ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Badge, { variant: "outline", color: "gray", children: maxSize }) : null
|
|
2917
|
+
] }) : null,
|
|
2918
|
+
policyText ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_core39.Text, { size: "sm", c: error ? "red.7" : "dimmed", children: policyText }) : null,
|
|
2602
2919
|
typeof error !== "string" && error ? error : null,
|
|
2603
|
-
resolvedRemoveAction || resolvedResetAction ? /* @__PURE__ */ (0,
|
|
2920
|
+
replaceAction || resolvedRemoveAction || resolvedResetAction || retryAction ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_core39.Group, { gap: "sm", children: [
|
|
2921
|
+
replaceAction,
|
|
2604
2922
|
resolvedResetAction,
|
|
2605
2923
|
retryAction,
|
|
2606
2924
|
resolvedRemoveAction
|
|
@@ -2611,49 +2929,63 @@ function MediaField({
|
|
|
2611
2929
|
}
|
|
2612
2930
|
|
|
2613
2931
|
// src/MediaCard.tsx
|
|
2614
|
-
var
|
|
2615
|
-
var
|
|
2932
|
+
var import_core40 = require("@mantine/core");
|
|
2933
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2616
2934
|
function MediaCard({ title, image, description, status, overlay, actions = [] }) {
|
|
2617
2935
|
const EyeIcon = GdsIcons.Eye;
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core40.Card, { withBorder: true, radius: "lg", padding: "md", children: [
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core40.Card.Section, { pos: "relative", children: [
|
|
2620
2938
|
image,
|
|
2621
|
-
overlay ? /* @__PURE__ */ (0,
|
|
2939
|
+
overlay ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { style: { position: "absolute", inset: 12, display: "flex", justifyContent: "flex-end", alignItems: "flex-start" }, children: overlay }) : null
|
|
2622
2940
|
] }),
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2626
|
-
/* @__PURE__ */ (0,
|
|
2627
|
-
description ? /* @__PURE__ */ (0,
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core40.Stack, { gap: "sm", mt: "md", children: [
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core40.Group, { justify: "space-between", align: "flex-start", children: [
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_core40.Stack, { gap: 4, children: [
|
|
2944
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core40.Title, { order: 4, children: title }),
|
|
2945
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core40.Text, { size: "sm", c: "dimmed", lineClamp: 2, children: description }) : null
|
|
2628
2946
|
] }),
|
|
2629
|
-
status ? /* @__PURE__ */ (0,
|
|
2947
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core40.Badge, { variant: "light", children: status }) : null
|
|
2630
2948
|
] }),
|
|
2631
|
-
actions.length ? /* @__PURE__ */ (0,
|
|
2949
|
+
actions.length ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core40.Group, { justify: "flex-end", gap: "xs", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_core40.ActionIcon, { variant: "light", "aria-label": action.label, onClick: action.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EyeIcon, { size: "1rem" }) }, action.label)) }) : null
|
|
2632
2950
|
] })
|
|
2633
2951
|
] });
|
|
2634
2952
|
}
|
|
2635
2953
|
|
|
2636
2954
|
// src/AccessSummary.tsx
|
|
2637
|
-
var
|
|
2638
|
-
var
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2955
|
+
var import_core41 = require("@mantine/core");
|
|
2956
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2957
|
+
var accessStateMeta = {
|
|
2958
|
+
allowed: { label: "Allowed", color: "teal" },
|
|
2959
|
+
blocked: { label: "Blocked", color: "red" },
|
|
2960
|
+
forbidden: { label: "Forbidden", color: "red" },
|
|
2961
|
+
expired: { label: "Expired", color: "orange" },
|
|
2962
|
+
"permission-limited": { label: "Permission limited", color: "grape" }
|
|
2963
|
+
};
|
|
2964
|
+
function AccessSummary({ title, roles, scope, blocked = false, state, owner, recoveryHint, description }) {
|
|
2965
|
+
const resolvedState = state ?? (blocked ? "blocked" : "allowed");
|
|
2966
|
+
const meta = accessStateMeta[resolvedState];
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Card, { withBorder: true, radius: "lg", padding: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core41.Stack, { gap: "sm", children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core41.Group, { justify: "space-between", align: "center", children: [
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Title, { order: 4, children: title }),
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Badge, { color: meta.color, variant: "light", children: meta.label })
|
|
2644
2971
|
] }),
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
scope ? /* @__PURE__ */ (0,
|
|
2972
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Group, { gap: "xs", children: roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Badge, { variant: "outline", children: role }, role)) }),
|
|
2973
|
+
scope ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core41.Text, { size: "sm", c: "dimmed", children: [
|
|
2647
2974
|
"Scope: ",
|
|
2648
2975
|
scope
|
|
2649
2976
|
] }) : null,
|
|
2650
|
-
|
|
2977
|
+
owner ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_core41.Text, { size: "sm", c: "dimmed", children: [
|
|
2978
|
+
"Owner: ",
|
|
2979
|
+
owner
|
|
2980
|
+
] }) : null,
|
|
2981
|
+
recoveryHint ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Text, { size: "sm", c: resolvedState === "allowed" ? "dimmed" : "red.7", children: recoveryHint }) : null,
|
|
2982
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_core41.Text, { size: "sm", children: description }) : null
|
|
2651
2983
|
] }) });
|
|
2652
2984
|
}
|
|
2653
2985
|
|
|
2654
2986
|
// src/PageHeader.tsx
|
|
2655
|
-
var
|
|
2656
|
-
var
|
|
2987
|
+
var import_core42 = require("@mantine/core");
|
|
2988
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2657
2989
|
function PageHeader({
|
|
2658
2990
|
title,
|
|
2659
2991
|
description,
|
|
@@ -2664,19 +2996,19 @@ function PageHeader({
|
|
|
2664
2996
|
}) {
|
|
2665
2997
|
const resolvedDescription = description ?? subtitle;
|
|
2666
2998
|
const eyebrowProps = eyebrowVariant === "ornamental" ? { tt: "uppercase", style: { letterSpacing: "0.12em" } } : {};
|
|
2667
|
-
return /* @__PURE__ */ (0,
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2669
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
2670
|
-
/* @__PURE__ */ (0,
|
|
2671
|
-
resolvedDescription && /* @__PURE__ */ (0,
|
|
2999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core42.Group, { justify: "space-between", align: "flex-start", gap: "lg", wrap: "wrap", children: [
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_core42.Stack, { gap: "xs", children: [
|
|
3001
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core42.Text, { size: "xs", fw: 700, c: "dimmed", ...eyebrowProps, children: eyebrow }),
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core42.Title, { order: 1, children: title }),
|
|
3003
|
+
resolvedDescription && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core42.Text, { c: "dimmed", maw: 720, children: resolvedDescription })
|
|
2672
3004
|
] }),
|
|
2673
|
-
actions ? /* @__PURE__ */ (0,
|
|
3005
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_core42.Box, { children: actions }) : null
|
|
2674
3006
|
] });
|
|
2675
3007
|
}
|
|
2676
3008
|
|
|
2677
3009
|
// src/FilterDrawer.tsx
|
|
2678
|
-
var
|
|
2679
|
-
var
|
|
3010
|
+
var import_core43 = require("@mantine/core");
|
|
3011
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2680
3012
|
function FilterDrawer({
|
|
2681
3013
|
opened,
|
|
2682
3014
|
onClose,
|
|
@@ -2692,8 +3024,8 @@ function FilterDrawer({
|
|
|
2692
3024
|
}) {
|
|
2693
3025
|
const resolvedPrimaryAction = applyAction ?? primaryAction;
|
|
2694
3026
|
const resolvedSecondaryAction = resetAction ?? secondaryAction;
|
|
2695
|
-
return /* @__PURE__ */ (0,
|
|
2696
|
-
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3028
|
+
import_core43.Drawer,
|
|
2697
3029
|
{
|
|
2698
3030
|
opened,
|
|
2699
3031
|
onClose,
|
|
@@ -2701,11 +3033,11 @@ function FilterDrawer({
|
|
|
2701
3033
|
position: mode === "bottom-sheet" ? "bottom" : "right",
|
|
2702
3034
|
size: mode === "bottom-sheet" ? "auto" : "md",
|
|
2703
3035
|
radius: mode === "bottom-sheet" ? "xl" : void 0,
|
|
2704
|
-
children: /* @__PURE__ */ (0,
|
|
2705
|
-
description ? /* @__PURE__ */ (0,
|
|
3036
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core43.Stack, { gap: "md", children: [
|
|
3037
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_core43.Text, { size: "sm", c: "dimmed", children: description }) : null,
|
|
2706
3038
|
children,
|
|
2707
|
-
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0,
|
|
2708
|
-
/* @__PURE__ */ (0,
|
|
3039
|
+
resolvedPrimaryAction || resolvedSecondaryAction || closeAction ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core43.Group, { justify: "space-between", mt: "md", children: [
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_core43.Group, { gap: "sm", children: [
|
|
2709
3041
|
closeAction,
|
|
2710
3042
|
resolvedSecondaryAction
|
|
2711
3043
|
] }),
|
|
@@ -2717,8 +3049,8 @@ function FilterDrawer({
|
|
|
2717
3049
|
}
|
|
2718
3050
|
|
|
2719
3051
|
// src/PlaceholderPanel.tsx
|
|
2720
|
-
var
|
|
2721
|
-
var
|
|
3052
|
+
var import_core44 = require("@mantine/core");
|
|
3053
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2722
3054
|
function PlaceholderPanel({
|
|
2723
3055
|
title,
|
|
2724
3056
|
description,
|
|
@@ -2728,16 +3060,16 @@ function PlaceholderPanel({
|
|
|
2728
3060
|
mode
|
|
2729
3061
|
}) {
|
|
2730
3062
|
if (mode === "live" && children) {
|
|
2731
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
2732
3064
|
}
|
|
2733
|
-
return /* @__PURE__ */ (0,
|
|
2734
|
-
badge ? /* @__PURE__ */ (0,
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
3065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_core44.Stack, { gap: "md", children: [
|
|
3066
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Badge, { variant: "light", color: "blue", w: "fit-content", children: badge }) : null,
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_core44.Stack, { gap: "xs", children: [
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Title, { order: 4, children: title }),
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Text, { c: "dimmed", children: description })
|
|
2738
3070
|
] }),
|
|
2739
|
-
footer ? /* @__PURE__ */ (0,
|
|
2740
|
-
/* @__PURE__ */ (0,
|
|
3071
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_core44.Text, { size: "sm", children: footer }) : null,
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2741
3073
|
StateBlock,
|
|
2742
3074
|
{
|
|
2743
3075
|
variant: "not-enough-data",
|
|
@@ -2750,8 +3082,8 @@ function PlaceholderPanel({
|
|
|
2750
3082
|
}
|
|
2751
3083
|
|
|
2752
3084
|
// src/SimpleDataTable.tsx
|
|
2753
|
-
var
|
|
2754
|
-
var
|
|
3085
|
+
var import_core45 = require("@mantine/core");
|
|
3086
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2755
3087
|
function SimpleDataTable({
|
|
2756
3088
|
columns,
|
|
2757
3089
|
rows,
|
|
@@ -2762,23 +3094,23 @@ function SimpleDataTable({
|
|
|
2762
3094
|
getRowKey
|
|
2763
3095
|
}) {
|
|
2764
3096
|
if (error) {
|
|
2765
|
-
return /* @__PURE__ */ (0,
|
|
3097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StateBlock, { variant: "error", title: "Unable to load data", description: error, compact: true });
|
|
2766
3098
|
}
|
|
2767
3099
|
if (loading) {
|
|
2768
|
-
return /* @__PURE__ */ (0,
|
|
3100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StateBlock, { variant: "loading", title: "Loading data", description: "Please wait while the shared dataset is prepared.", compact: true });
|
|
2769
3101
|
}
|
|
2770
3102
|
if (!rows.length) {
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
3103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StateBlock, { variant: "empty", title: emptyTitle, description: emptyDescription, compact: true });
|
|
2772
3104
|
}
|
|
2773
|
-
return /* @__PURE__ */ (0,
|
|
2774
|
-
/* @__PURE__ */ (0,
|
|
2775
|
-
/* @__PURE__ */ (0,
|
|
3105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.ScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_core45.Table, { striped: true, highlightOnHover: true, withTableBorder: true, withColumnBorders: true, children: [
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Th, { children: column.header }, String(column.key))) }) }),
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Tbody, { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Tr, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_core45.Table.Td, { children: column.render ? column.render(row) : String(row[column.key] ?? "") }, String(column.key))) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
2776
3108
|
] }) });
|
|
2777
3109
|
}
|
|
2778
3110
|
|
|
2779
3111
|
// src/StatsSection.tsx
|
|
2780
|
-
var
|
|
2781
|
-
var
|
|
3112
|
+
var import_core46 = require("@mantine/core");
|
|
3113
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2782
3114
|
function StatsSection({
|
|
2783
3115
|
title,
|
|
2784
3116
|
loading = false,
|
|
@@ -2790,11 +3122,11 @@ function StatsSection({
|
|
|
2790
3122
|
}) {
|
|
2791
3123
|
let content = children;
|
|
2792
3124
|
if (error) {
|
|
2793
|
-
content = /* @__PURE__ */ (0,
|
|
3125
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StateBlock, { variant: "error", title: "Unable to load statistics", description: error, compact: true });
|
|
2794
3126
|
} else if (loading) {
|
|
2795
|
-
content = /* @__PURE__ */ (0,
|
|
3127
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StateBlock, { variant: "loading", title: "Loading statistics", description: "This shared data surface is still synchronizing.", compact: true });
|
|
2796
3128
|
} else if (belowThreshold) {
|
|
2797
|
-
content = /* @__PURE__ */ (0,
|
|
3129
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2798
3130
|
StateBlock,
|
|
2799
3131
|
{
|
|
2800
3132
|
variant: "not-enough-data",
|
|
@@ -2804,14 +3136,380 @@ function StatsSection({
|
|
|
2804
3136
|
}
|
|
2805
3137
|
);
|
|
2806
3138
|
} else if (placeholder) {
|
|
2807
|
-
content = /* @__PURE__ */ (0,
|
|
3139
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PlaceholderPanel, { ...placeholder, mode: "placeholder" });
|
|
2808
3140
|
}
|
|
2809
|
-
return /* @__PURE__ */ (0,
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
3141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_core46.Stack, { gap: "md", children: [
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_core46.Title, { order: 3, children: title }),
|
|
2811
3143
|
content
|
|
2812
3144
|
] });
|
|
2813
3145
|
}
|
|
2814
3146
|
|
|
3147
|
+
// src/PeriodSelector.tsx
|
|
3148
|
+
var import_core47 = require("@mantine/core");
|
|
3149
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3150
|
+
function PeriodSelector({
|
|
3151
|
+
label,
|
|
3152
|
+
description,
|
|
3153
|
+
value,
|
|
3154
|
+
options,
|
|
3155
|
+
onChange,
|
|
3156
|
+
timezone,
|
|
3157
|
+
scope,
|
|
3158
|
+
helperText,
|
|
3159
|
+
error,
|
|
3160
|
+
stale = false,
|
|
3161
|
+
filtered = false,
|
|
3162
|
+
disabled = false
|
|
3163
|
+
}) {
|
|
3164
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
3165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FormField, { label, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core47.Stack, { gap: "sm", children: [
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3167
|
+
"select",
|
|
3168
|
+
{
|
|
3169
|
+
"aria-label": typeof label === "string" ? label : "Reporting period",
|
|
3170
|
+
value,
|
|
3171
|
+
disabled,
|
|
3172
|
+
onChange: (event) => onChange?.(event.currentTarget.value),
|
|
3173
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("option", { value: option.value, children: option.label }, option.value))
|
|
3174
|
+
}
|
|
3175
|
+
),
|
|
3176
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core47.Group, { gap: "xs", wrap: "wrap", children: [
|
|
3177
|
+
timezone ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_core47.Badge, { variant: "outline", color: "gray", children: [
|
|
3178
|
+
"Timezone: ",
|
|
3179
|
+
timezone
|
|
3180
|
+
] }) : null,
|
|
3181
|
+
filtered ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core47.Badge, { variant: "light", color: "blue", children: "Filtered" }) : null,
|
|
3182
|
+
stale ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core47.Badge, { variant: "light", color: "orange", children: "Stale data" }) : null,
|
|
3183
|
+
scope ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core47.Badge, { variant: "outline", color: "gray", children: scope }) : null
|
|
3184
|
+
] }),
|
|
3185
|
+
selectedOption?.description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core47.Text, { size: "sm", c: "dimmed", children: selectedOption.description }) : null,
|
|
3186
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_core47.Text, { size: "sm", c: "dimmed", children: helperText }) : null
|
|
3187
|
+
] }) });
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
// src/EvidencePanel.tsx
|
|
3191
|
+
var import_core48 = require("@mantine/core");
|
|
3192
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3193
|
+
var stateTone2 = {
|
|
3194
|
+
current: { label: "Current", color: "teal" },
|
|
3195
|
+
stale: { label: "Stale", color: "orange" },
|
|
3196
|
+
partial: { label: "Partial data", color: "yellow" },
|
|
3197
|
+
"permission-limited": { label: "Permission limited", color: "grape" },
|
|
3198
|
+
loading: { label: "Loading", color: "blue" },
|
|
3199
|
+
empty: { label: "No evidence", color: "gray" },
|
|
3200
|
+
error: { label: "Needs attention", color: "red" }
|
|
3201
|
+
};
|
|
3202
|
+
function EvidencePanel({
|
|
3203
|
+
title,
|
|
3204
|
+
description,
|
|
3205
|
+
source,
|
|
3206
|
+
freshness,
|
|
3207
|
+
confidence,
|
|
3208
|
+
state = "current",
|
|
3209
|
+
evidenceCount,
|
|
3210
|
+
permissionNote,
|
|
3211
|
+
retryAction,
|
|
3212
|
+
details,
|
|
3213
|
+
children
|
|
3214
|
+
}) {
|
|
3215
|
+
const tone = stateTone2[state];
|
|
3216
|
+
const isProblem = state === "error" || state === "permission-limited" || state === "stale" || state === "partial";
|
|
3217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core48.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Stack, { gap: "md", children: [
|
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Stack, { gap: 4, children: [
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core48.Title, { order: 4, children: title }),
|
|
3221
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core48.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
3222
|
+
] }),
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core48.Badge, { variant: "light", color: tone.color, children: tone.label })
|
|
3224
|
+
] }),
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Group, { gap: "xs", wrap: "wrap", children: [
|
|
3226
|
+
source ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Badge, { variant: "outline", color: "gray", children: [
|
|
3227
|
+
"Source: ",
|
|
3228
|
+
source
|
|
3229
|
+
] }) : null,
|
|
3230
|
+
freshness ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Badge, { variant: "outline", color: "gray", children: [
|
|
3231
|
+
"Freshness: ",
|
|
3232
|
+
freshness
|
|
3233
|
+
] }) : null,
|
|
3234
|
+
confidence ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Badge, { variant: "outline", color: "gray", children: [
|
|
3235
|
+
"Confidence: ",
|
|
3236
|
+
confidence
|
|
3237
|
+
] }) : null,
|
|
3238
|
+
typeof evidenceCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_core48.Badge, { variant: "outline", color: "gray", children: [
|
|
3239
|
+
"Evidence: ",
|
|
3240
|
+
evidenceCount
|
|
3241
|
+
] }) : null
|
|
3242
|
+
] }),
|
|
3243
|
+
permissionNote ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_core48.Alert, { color: isProblem ? tone.color : "gray", variant: "light", children: permissionNote }) : null,
|
|
3244
|
+
details,
|
|
3245
|
+
children,
|
|
3246
|
+
retryAction
|
|
3247
|
+
] }) });
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
// src/ChartTokenPanel.tsx
|
|
3251
|
+
var import_core49 = require("@mantine/core");
|
|
3252
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3253
|
+
function ChartTokenPanel({
|
|
3254
|
+
title,
|
|
3255
|
+
description,
|
|
3256
|
+
summary,
|
|
3257
|
+
state = "ready",
|
|
3258
|
+
legend = [],
|
|
3259
|
+
children,
|
|
3260
|
+
tableFallback,
|
|
3261
|
+
retryAction
|
|
3262
|
+
}) {
|
|
3263
|
+
if (state === "loading") {
|
|
3264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StateBlock, { variant: "loading", title: "Loading chart", description: summary, compact: true, action: retryAction });
|
|
3265
|
+
}
|
|
3266
|
+
if (state === "empty") {
|
|
3267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StateBlock, { variant: "empty", title: "No chart data", description: summary, compact: true, action: retryAction });
|
|
3268
|
+
}
|
|
3269
|
+
if (state === "below-threshold") {
|
|
3270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StateBlock, { variant: "not-enough-data", title: "Not enough data for chart", description: summary, compact: true, action: retryAction });
|
|
3271
|
+
}
|
|
3272
|
+
if (state === "error") {
|
|
3273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StateBlock, { variant: "error", title: "Unable to load chart", description: summary, compact: true, action: retryAction });
|
|
3274
|
+
}
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_core49.Stack, { gap: "md", children: [
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_core49.Group, { justify: "space-between", align: "flex-start", gap: "sm", children: [
|
|
3277
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_core49.Stack, { gap: 4, children: [
|
|
3278
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Title, { order: 4, children: title }),
|
|
3279
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
3280
|
+
] }),
|
|
3281
|
+
state !== "ready" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Badge, { variant: "light", color: state === "permission-limited" ? "grape" : "yellow", children: state.replace("-", " ") }) : null
|
|
3282
|
+
] }),
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Text, { size: "sm", children: summary }),
|
|
3284
|
+
legend.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Group, { gap: "xs", wrap: "wrap", "aria-label": "Chart legend", children: legend.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_core49.Badge, { variant: "outline", color: "gray", title: typeof item.description === "string" ? item.description : void 0, children: [
|
|
3285
|
+
item.label,
|
|
3286
|
+
": ",
|
|
3287
|
+
item.token
|
|
3288
|
+
] }, `${String(item.label)}-${index}`)) }) : null,
|
|
3289
|
+
children,
|
|
3290
|
+
tableFallback ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_core49.Stack, { gap: "xs", children: [
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_core49.Text, { size: "sm", fw: 600, children: "Accessible data fallback" }),
|
|
3292
|
+
tableFallback
|
|
3293
|
+
] }) : null
|
|
3294
|
+
] }) });
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
// src/GdsChart.tsx
|
|
3298
|
+
var import_core50 = require("@mantine/core");
|
|
3299
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3300
|
+
function GdsChart({ type, title, summary, data, state = "ready", retryAction }) {
|
|
3301
|
+
const tableRows = data.map((item) => ({ label: item.label, value: String(item.value), group: item.group ?? "-" }));
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3303
|
+
ChartTokenPanel,
|
|
3304
|
+
{
|
|
3305
|
+
title,
|
|
3306
|
+
summary,
|
|
3307
|
+
state,
|
|
3308
|
+
retryAction,
|
|
3309
|
+
legend: [
|
|
3310
|
+
{ label: "Primary", token: "var(--mantine-color-blue-6)" },
|
|
3311
|
+
{ label: "Secondary", token: "var(--mantine-color-teal-6)" }
|
|
3312
|
+
],
|
|
3313
|
+
tableFallback: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3314
|
+
SimpleDataTable,
|
|
3315
|
+
{
|
|
3316
|
+
columns: [
|
|
3317
|
+
{ key: "label", header: "Label" },
|
|
3318
|
+
{ key: "value", header: "Value" },
|
|
3319
|
+
{ key: "group", header: "Group" }
|
|
3320
|
+
],
|
|
3321
|
+
rows: tableRows
|
|
3322
|
+
}
|
|
3323
|
+
),
|
|
3324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core50.Paper, { withBorder: true, radius: "md", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_core50.Stack, { gap: "sm", children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_core50.Group, { justify: "space-between", children: [
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core50.Text, { fw: 700, children: title }),
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core50.Badge, { variant: "light", children: type })
|
|
3328
|
+
] }),
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_core50.Text, { size: "sm", c: "dimmed", children: summary }),
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_core50.Text, { size: "xs", c: "dimmed", children: [
|
|
3331
|
+
"Type lane: ",
|
|
3332
|
+
type
|
|
3333
|
+
] })
|
|
3334
|
+
] }) })
|
|
3335
|
+
}
|
|
3336
|
+
);
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
// src/LayoutBlocks.tsx
|
|
3340
|
+
var import_core51 = require("@mantine/core");
|
|
3341
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3342
|
+
function renderBlock(block) {
|
|
3343
|
+
switch (block.type) {
|
|
3344
|
+
case "hero":
|
|
3345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SectionPanel, { title: String(block.props.title ?? "Hero"), description: String(block.props.description ?? "Hero block"), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Text, { children: String(block.props.body ?? "Composable hero content") }) });
|
|
3346
|
+
case "stats":
|
|
3347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.SimpleGrid, { cols: { base: 1, md: 3 }, children: block.props.items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Card, { withBorder: true, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_core51.Stack, { gap: 2, children: [
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Text, { size: "sm", c: "dimmed", children: item.label }),
|
|
3349
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Title, { order: 4, children: item.value })
|
|
3350
|
+
] }) }, `${block.id}-${item.label}`)) ?? null });
|
|
3351
|
+
case "cards-grid":
|
|
3352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.SimpleGrid, { cols: { base: 1, md: 2 }, children: block.props.items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ListingCard, { title: item.title, description: item.description, size: "sm" }, `${block.id}-${item.title}`)) ?? null });
|
|
3353
|
+
case "chart":
|
|
3354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3355
|
+
GdsChart,
|
|
3356
|
+
{
|
|
3357
|
+
type: block.props.chartType ?? "bar",
|
|
3358
|
+
title: String(block.props.title ?? "Chart block"),
|
|
3359
|
+
summary: String(block.props.summary ?? "Block-composed chart summary"),
|
|
3360
|
+
data: block.props.data ?? [{ label: "A", value: 10 }]
|
|
3361
|
+
}
|
|
3362
|
+
);
|
|
3363
|
+
case "cta":
|
|
3364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3365
|
+
ActionBar,
|
|
3366
|
+
{
|
|
3367
|
+
primary: { action: "save" },
|
|
3368
|
+
secondary: [{ action: "cancel" }],
|
|
3369
|
+
tertiary: [{ action: "preview" }]
|
|
3370
|
+
}
|
|
3371
|
+
);
|
|
3372
|
+
case "footer":
|
|
3373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Text, { size: "sm", c: "dimmed", children: String(block.props.text ?? "Footer block") });
|
|
3374
|
+
default:
|
|
3375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Alert, { color: "red", children: "Unsupported block type." });
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
function renderGdsLayout(schema) {
|
|
3379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_core51.Stack, { gap: "lg", children: schema.blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: renderBlock(block) }, block.id)) });
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
// src/ReportingSection.tsx
|
|
3383
|
+
var import_core52 = require("@mantine/core");
|
|
3384
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3385
|
+
function ReportingSection({
|
|
3386
|
+
title,
|
|
3387
|
+
description,
|
|
3388
|
+
state = "ready",
|
|
3389
|
+
periodControl,
|
|
3390
|
+
evidence,
|
|
3391
|
+
metrics,
|
|
3392
|
+
chart,
|
|
3393
|
+
table,
|
|
3394
|
+
action,
|
|
3395
|
+
stateMessage,
|
|
3396
|
+
retryAction
|
|
3397
|
+
}) {
|
|
3398
|
+
let stateBlock = null;
|
|
3399
|
+
if (state === "loading") {
|
|
3400
|
+
stateBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "loading", title: "Loading report", description: stateMessage ?? "The reporting surface is synchronizing.", compact: true });
|
|
3401
|
+
} else if (state === "empty") {
|
|
3402
|
+
stateBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "empty", title: "No report data", description: stateMessage ?? "No records match this reporting scope yet.", compact: true });
|
|
3403
|
+
} else if (state === "error") {
|
|
3404
|
+
stateBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "error", title: "Unable to load report", description: stateMessage ?? "The report could not be prepared.", compact: true, action: retryAction });
|
|
3405
|
+
} else if (state === "below-threshold") {
|
|
3406
|
+
stateBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "not-enough-data", title: "Not enough data", description: stateMessage ?? "This report is hidden until the threshold is met.", compact: true });
|
|
3407
|
+
} else if (state === "permission-limited") {
|
|
3408
|
+
stateBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "permission", title: "Permission-limited report", description: stateMessage ?? "Some evidence is hidden by access rules.", compact: true, action: retryAction });
|
|
3409
|
+
}
|
|
3410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core52.Paper, { withBorder: true, radius: "xl", p: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_core52.Stack, { gap: "lg", children: [
|
|
3411
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_core52.Group, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
3412
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_core52.Stack, { gap: 4, children: [
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core52.Title, { order: 3, children: title }),
|
|
3414
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_core52.Text, { size: "sm", c: "dimmed", children: description }) : null
|
|
3415
|
+
] }),
|
|
3416
|
+
action
|
|
3417
|
+
] }),
|
|
3418
|
+
periodControl,
|
|
3419
|
+
(state === "partial" || state === "stale" || state === "filtered") && stateMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StateBlock, { variant: "info", title: state === "partial" ? "Partial report" : state === "stale" ? "Stale report" : "Filtered report", description: stateMessage, compact: true }) : null,
|
|
3420
|
+
stateBlock,
|
|
3421
|
+
metrics,
|
|
3422
|
+
chart,
|
|
3423
|
+
table,
|
|
3424
|
+
evidence
|
|
3425
|
+
] }) });
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
// src/Notifications.tsx
|
|
3429
|
+
var import_core53 = require("@mantine/core");
|
|
3430
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3431
|
+
var notificationColorMap = {
|
|
3432
|
+
success: "teal",
|
|
3433
|
+
error: "red",
|
|
3434
|
+
warning: "yellow",
|
|
3435
|
+
info: "blue",
|
|
3436
|
+
neutral: "gray"
|
|
3437
|
+
};
|
|
3438
|
+
function severityToStateVariant(severity) {
|
|
3439
|
+
if (severity === "success") return "success";
|
|
3440
|
+
if (severity === "error") return "error";
|
|
3441
|
+
if (severity === "warning") return "not-enough-data";
|
|
3442
|
+
if (severity === "neutral") return "disabled";
|
|
3443
|
+
return "info";
|
|
3444
|
+
}
|
|
3445
|
+
function InlineAlert({
|
|
3446
|
+
title,
|
|
3447
|
+
message,
|
|
3448
|
+
severity = "info",
|
|
3449
|
+
action
|
|
3450
|
+
}) {
|
|
3451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3452
|
+
import_core53.Alert,
|
|
3453
|
+
{
|
|
3454
|
+
variant: "light",
|
|
3455
|
+
color: notificationColorMap[severity],
|
|
3456
|
+
title,
|
|
3457
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GdsIcons.Info, { size: "1rem" }),
|
|
3458
|
+
role: severity === "error" ? "alert" : "status",
|
|
3459
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Stack, { gap: "xs", children: [
|
|
3460
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Text, { size: "sm", children: message }) : null,
|
|
3461
|
+
action
|
|
3462
|
+
] })
|
|
3463
|
+
}
|
|
3464
|
+
);
|
|
3465
|
+
}
|
|
3466
|
+
function BannerNotice({
|
|
3467
|
+
eyebrow,
|
|
3468
|
+
title,
|
|
3469
|
+
message,
|
|
3470
|
+
severity = "info",
|
|
3471
|
+
action
|
|
3472
|
+
}) {
|
|
3473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Paper, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Stack, { gap: "xs", children: [
|
|
3474
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Group, { justify: "space-between", align: "center", children: [
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Group, { gap: "xs", children: [
|
|
3476
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Badge, { variant: "light", children: eyebrow }) : null,
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Badge, { variant: "light", color: notificationColorMap[severity], children: severityToStateVariant(severity).replace("-", " ") })
|
|
3478
|
+
] }),
|
|
3479
|
+
action
|
|
3480
|
+
] }),
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Title, { order: 4, children: title }),
|
|
3482
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Text, { size: "sm", c: "dimmed", children: message }) : null
|
|
3483
|
+
] }) });
|
|
3484
|
+
}
|
|
3485
|
+
function NotificationCenterView({
|
|
3486
|
+
notifications,
|
|
3487
|
+
onDismiss,
|
|
3488
|
+
onClear,
|
|
3489
|
+
title = "Notifications",
|
|
3490
|
+
emptyMessage = "No active notifications."
|
|
3491
|
+
}) {
|
|
3492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Paper, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Stack, { gap: "md", children: [
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Group, { justify: "space-between", align: "center", children: [
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Title, { order: 4, children: title }),
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Button, { size: "xs", variant: "subtle", onClick: onClear, disabled: notifications.length === 0 || !onClear, children: "Clear all" })
|
|
3496
|
+
] }),
|
|
3497
|
+
notifications.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Text, { size: "sm", c: "dimmed", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Stack, { gap: "sm", children: notifications.map((item) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3498
|
+
InlineAlert,
|
|
3499
|
+
{
|
|
3500
|
+
severity: item.severity,
|
|
3501
|
+
title: item.title,
|
|
3502
|
+
message: item.message,
|
|
3503
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_core53.Group, { gap: "xs", children: [
|
|
3504
|
+
item.actions?.map((action) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Button, { size: "xs", variant: "default", onClick: action.onClick, children: action.label }, action.id)),
|
|
3505
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_core53.Button, { size: "xs", variant: "subtle", onClick: () => onDismiss?.(item.id), disabled: !onDismiss, children: "Dismiss" })
|
|
3506
|
+
] })
|
|
3507
|
+
},
|
|
3508
|
+
item.id
|
|
3509
|
+
)) })
|
|
3510
|
+
] }) });
|
|
3511
|
+
}
|
|
3512
|
+
|
|
2815
3513
|
// src/locales/ar.ts
|
|
2816
3514
|
var ar = {
|
|
2817
3515
|
"gds.action.settings": "\u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A",
|
|
@@ -4118,12 +4816,18 @@ function getGdsMessages(locale) {
|
|
|
4118
4816
|
0 && (module.exports = {
|
|
4119
4817
|
AccentPanel,
|
|
4120
4818
|
AccessSummary,
|
|
4819
|
+
ActiveFilterChips,
|
|
4121
4820
|
ArticleShell,
|
|
4821
|
+
AsyncSurface,
|
|
4122
4822
|
AuthShell,
|
|
4823
|
+
BannerNotice,
|
|
4123
4824
|
BrowseSurface,
|
|
4825
|
+
BulkActionsBar,
|
|
4826
|
+
ChartTokenPanel,
|
|
4124
4827
|
ChoiceChip,
|
|
4125
4828
|
ConsumerDashboardGrid,
|
|
4126
4829
|
ConsumerSection,
|
|
4830
|
+
CountBadge,
|
|
4127
4831
|
CtaButtonGroup,
|
|
4128
4832
|
DataToolbar,
|
|
4129
4833
|
DetailProfileShell,
|
|
@@ -4131,19 +4835,25 @@ function getGdsMessages(locale) {
|
|
|
4131
4835
|
EditorialCard,
|
|
4132
4836
|
EditorialHero,
|
|
4133
4837
|
EmptyState,
|
|
4838
|
+
EvidencePanel,
|
|
4134
4839
|
FeatureBand,
|
|
4135
4840
|
FilterDrawer,
|
|
4136
4841
|
FoodMenuSection,
|
|
4137
4842
|
FormField,
|
|
4843
|
+
GdsChart,
|
|
4138
4844
|
GdsIcons,
|
|
4139
4845
|
GdsVocabulary,
|
|
4846
|
+
InlineAlert,
|
|
4847
|
+
LabelTag,
|
|
4140
4848
|
ListingCard,
|
|
4141
4849
|
MapPanel,
|
|
4142
4850
|
MediaCard,
|
|
4143
4851
|
MediaField,
|
|
4144
4852
|
MetricCard,
|
|
4853
|
+
NotificationCenterView,
|
|
4145
4854
|
PROVIDER_IDENTITY_REGISTRY,
|
|
4146
4855
|
PageHeader,
|
|
4856
|
+
PeriodSelector,
|
|
4147
4857
|
PlaceholderPanel,
|
|
4148
4858
|
PlaybackSurface,
|
|
4149
4859
|
ProductCard,
|
|
@@ -4160,9 +4870,12 @@ function getGdsMessages(locale) {
|
|
|
4160
4870
|
ReferenceLinkGrid,
|
|
4161
4871
|
ReferenceLocaleNotice,
|
|
4162
4872
|
ReferenceSection,
|
|
4873
|
+
ReportingSection,
|
|
4874
|
+
ResultSummary,
|
|
4163
4875
|
SectionPanel,
|
|
4164
4876
|
SimpleDataTable,
|
|
4165
4877
|
SocialAuthButtons,
|
|
4878
|
+
SortMenu,
|
|
4166
4879
|
StateBlock,
|
|
4167
4880
|
StatsSection,
|
|
4168
4881
|
StatusBadge,
|
|
@@ -4172,16 +4885,21 @@ function getGdsMessages(locale) {
|
|
|
4172
4885
|
en,
|
|
4173
4886
|
es,
|
|
4174
4887
|
fr,
|
|
4888
|
+
gdsCardSizePaddingMap,
|
|
4889
|
+
gdsCardTitleOrderMap,
|
|
4175
4890
|
gdsLocales,
|
|
4176
4891
|
getGdsMessages,
|
|
4177
4892
|
getProviderIdentityLabel,
|
|
4893
|
+
getProviderIdentityPolicy,
|
|
4178
4894
|
getSemanticActionConfig,
|
|
4179
4895
|
getSemanticActionLabel,
|
|
4896
|
+
getSupportedProviderIdentityIds,
|
|
4180
4897
|
he,
|
|
4181
4898
|
hu,
|
|
4182
4899
|
isPresentationMode,
|
|
4183
4900
|
it,
|
|
4184
4901
|
mergeGdsVocabularyPacks,
|
|
4902
|
+
renderGdsLayout,
|
|
4185
4903
|
resolveAccentPanelStyles,
|
|
4186
4904
|
resolveSemanticActionConfig,
|
|
4187
4905
|
resolveSurfacePresentationStyles,
|