@meetreeve/ui 0.18.1 → 0.20.0
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/README.md +24 -0
- package/dist/index.d.mts +55 -1
- package/dist/index.d.ts +55 -1
- package/dist/index.js +318 -165
- package/dist/index.mjs +316 -165
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -284,7 +284,80 @@ function ResponsiveHeader({
|
|
|
284
284
|
};
|
|
285
285
|
}, [open]);
|
|
286
286
|
const hasSecondary = Boolean(nav && nav.length > 0 || auth || themeToggle);
|
|
287
|
-
const
|
|
287
|
+
const [failed, setFailed] = useState3(() => /* @__PURE__ */ new Set());
|
|
288
|
+
const onImageError = (src) => () => setFailed((prev) => new Set(prev).add(src));
|
|
289
|
+
const { wordmark, wordmarkDark, favicon } = brand;
|
|
290
|
+
const lightOk = !!wordmark && !failed.has(wordmark);
|
|
291
|
+
const darkOk = !!wordmarkDark && !failed.has(wordmarkDark);
|
|
292
|
+
const glyphBrand = favicon && failed.has(favicon) ? { ...brand, favicon: null } : brand;
|
|
293
|
+
const brandLockup = wordmark ? /* @__PURE__ */ jsxs2("span", { "data-testid": "header-lockup", className: "flex items-center", children: [
|
|
294
|
+
/* @__PURE__ */ jsx2("span", { className: "flex @min-[768px]:hidden", children: favicon && !failed.has(favicon) ? (
|
|
295
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
296
|
+
/* @__PURE__ */ jsx2(
|
|
297
|
+
"img",
|
|
298
|
+
{
|
|
299
|
+
src: favicon,
|
|
300
|
+
alt: brand.name,
|
|
301
|
+
width: 28,
|
|
302
|
+
height: 28,
|
|
303
|
+
"data-testid": "header-mark-image",
|
|
304
|
+
onError: onImageError(favicon),
|
|
305
|
+
className: "h-7 w-7 object-contain"
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
) : /* @__PURE__ */ jsx2(BrandGlyph, { brand: glyphBrand, size: "lg" }) }),
|
|
309
|
+
lightOk ? (
|
|
310
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
311
|
+
/* @__PURE__ */ jsx2(
|
|
312
|
+
"img",
|
|
313
|
+
{
|
|
314
|
+
src: wordmark,
|
|
315
|
+
alt: brand.name,
|
|
316
|
+
"data-testid": "header-wordmark-image",
|
|
317
|
+
onError: onImageError(wordmark),
|
|
318
|
+
className: cn(
|
|
319
|
+
"hidden h-5 w-auto object-contain @min-[768px]:block",
|
|
320
|
+
darkOk && "@min-[768px]:dark:hidden"
|
|
321
|
+
),
|
|
322
|
+
style: { maxWidth: MIN_SIZES.wordmarkMaxWidth }
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
) : /* @__PURE__ */ jsxs2(
|
|
326
|
+
"span",
|
|
327
|
+
{
|
|
328
|
+
"data-testid": "header-wordmark-fallback",
|
|
329
|
+
className: cn(
|
|
330
|
+
"hidden @min-[768px]:flex items-baseline",
|
|
331
|
+
LOCKUP_GAP,
|
|
332
|
+
darkOk && "@min-[768px]:dark:hidden"
|
|
333
|
+
),
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ jsx2(BrandGlyph, { brand: glyphBrand, size: "lg" }),
|
|
336
|
+
/* @__PURE__ */ jsx2(
|
|
337
|
+
"span",
|
|
338
|
+
{
|
|
339
|
+
"data-testid": "header-wordmark",
|
|
340
|
+
className: cn("truncate text-foreground", WORDMARK_TEXT_LG, WORDMARK_WEIGHT_CLASS),
|
|
341
|
+
style: { maxWidth: MIN_SIZES.wordmarkMaxWidth },
|
|
342
|
+
children: brand.name
|
|
343
|
+
}
|
|
344
|
+
)
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
darkOk && // eslint-disable-next-line @next/next/no-img-element
|
|
349
|
+
/* @__PURE__ */ jsx2(
|
|
350
|
+
"img",
|
|
351
|
+
{
|
|
352
|
+
src: wordmarkDark,
|
|
353
|
+
alt: brand.name,
|
|
354
|
+
"data-testid": "header-wordmark-image-dark",
|
|
355
|
+
onError: onImageError(wordmarkDark),
|
|
356
|
+
className: "hidden h-5 w-auto object-contain @min-[768px]:dark:block",
|
|
357
|
+
style: { maxWidth: MIN_SIZES.wordmarkMaxWidth }
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
] }) : /* @__PURE__ */ jsxs2("span", { "data-testid": "header-lockup", className: cn(LOCKUP_ROW, LOCKUP_GAP), children: [
|
|
288
361
|
/* @__PURE__ */ jsx2(BrandGlyph, { brand, size: "lg" }),
|
|
289
362
|
/* @__PURE__ */ jsx2(
|
|
290
363
|
"span",
|
|
@@ -417,12 +490,88 @@ function useResponsivePlaceholder(desktop, mobile) {
|
|
|
417
490
|
return isDesktop ? desktop : mobile ?? desktop;
|
|
418
491
|
}
|
|
419
492
|
|
|
493
|
+
// src/site-footer.tsx
|
|
494
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
495
|
+
var DEFAULT_LEGAL_LINKS = [
|
|
496
|
+
{ href: "/privacy", label: "Privacy" },
|
|
497
|
+
{ href: "/terms", label: "Terms" },
|
|
498
|
+
{ href: "/cookies", label: "Cookies" }
|
|
499
|
+
];
|
|
500
|
+
var LINK_CLASS = "inline-flex items-center justify-center transition-colors hover:text-foreground";
|
|
501
|
+
function SiteFooter({
|
|
502
|
+
brandName,
|
|
503
|
+
links = [],
|
|
504
|
+
legal = DEFAULT_LEGAL_LINKS,
|
|
505
|
+
showBadge,
|
|
506
|
+
linkComponent,
|
|
507
|
+
className
|
|
508
|
+
}) {
|
|
509
|
+
const LinkEl = linkComponent ?? "a";
|
|
510
|
+
const badge = showBadge !== false;
|
|
511
|
+
return /* @__PURE__ */ jsx3("footer", { className: cn("border-t border-border", className), children: /* @__PURE__ */ jsxs3("div", { className: "mx-auto max-w-6xl px-6 py-8", children: [
|
|
512
|
+
links.length > 0 ? /* @__PURE__ */ jsx3(
|
|
513
|
+
"nav",
|
|
514
|
+
{
|
|
515
|
+
"aria-label": `${brandName} pages`,
|
|
516
|
+
className: "flex flex-wrap gap-x-5 gap-y-2 border-b border-border/60 pb-5 text-xs",
|
|
517
|
+
children: links.map((link) => /* @__PURE__ */ jsx3(
|
|
518
|
+
LinkEl,
|
|
519
|
+
{
|
|
520
|
+
href: link.href,
|
|
521
|
+
className: cn(LINK_CLASS, "text-muted-foreground"),
|
|
522
|
+
style: TOUCH_TARGET_STYLE,
|
|
523
|
+
children: link.label
|
|
524
|
+
},
|
|
525
|
+
link.href
|
|
526
|
+
))
|
|
527
|
+
}
|
|
528
|
+
) : null,
|
|
529
|
+
/* @__PURE__ */ jsxs3(
|
|
530
|
+
"div",
|
|
531
|
+
{
|
|
532
|
+
className: cn(
|
|
533
|
+
"flex flex-col items-start justify-between gap-2 text-xs text-muted-foreground sm:flex-row sm:items-center",
|
|
534
|
+
links.length > 0 && "pt-5"
|
|
535
|
+
),
|
|
536
|
+
children: [
|
|
537
|
+
/* @__PURE__ */ jsxs3("span", { children: [
|
|
538
|
+
"\xA9 ",
|
|
539
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
540
|
+
" ",
|
|
541
|
+
brandName
|
|
542
|
+
] }),
|
|
543
|
+
legal.length > 0 ? /* @__PURE__ */ jsx3("nav", { "aria-label": "Legal", className: "flex flex-wrap items-center gap-x-4", children: legal.map((link) => /* @__PURE__ */ jsx3(
|
|
544
|
+
LinkEl,
|
|
545
|
+
{
|
|
546
|
+
href: link.href,
|
|
547
|
+
className: LINK_CLASS,
|
|
548
|
+
style: TOUCH_TARGET_STYLE,
|
|
549
|
+
children: link.label
|
|
550
|
+
},
|
|
551
|
+
link.href
|
|
552
|
+
)) }) : null,
|
|
553
|
+
badge ? /* @__PURE__ */ jsx3(
|
|
554
|
+
"a",
|
|
555
|
+
{
|
|
556
|
+
href: "https://www.meetreeve.com",
|
|
557
|
+
rel: "noopener",
|
|
558
|
+
className: "inline-flex items-center text-[11px] text-muted-foreground transition-colors hover:text-foreground",
|
|
559
|
+
style: TOUCH_TARGET_STYLE,
|
|
560
|
+
children: "Made with Reeve"
|
|
561
|
+
}
|
|
562
|
+
) : null
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
)
|
|
566
|
+
] }) });
|
|
567
|
+
}
|
|
568
|
+
|
|
420
569
|
// src/info-tip.tsx
|
|
421
570
|
import { Popover } from "@base-ui/react/popover";
|
|
422
|
-
import { jsx as
|
|
571
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
423
572
|
function InfoTip({ children, label = "More information", side = "top", align = "center", className }) {
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ jsxs4(Popover.Root, { children: [
|
|
574
|
+
/* @__PURE__ */ jsx4(
|
|
426
575
|
Popover.Trigger,
|
|
427
576
|
{
|
|
428
577
|
openOnHover: true,
|
|
@@ -434,7 +583,7 @@ function InfoTip({ children, label = "More information", side = "top", align = "
|
|
|
434
583
|
"group -my-3.5 inline-flex shrink-0 cursor-help items-center justify-center rounded-full align-middle text-muted-foreground outline-none transition-colors hover:text-foreground data-[popup-open]:text-foreground",
|
|
435
584
|
className
|
|
436
585
|
),
|
|
437
|
-
children: /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ jsx4(
|
|
438
587
|
"span",
|
|
439
588
|
{
|
|
440
589
|
"aria-hidden": "true",
|
|
@@ -444,12 +593,12 @@ function InfoTip({ children, label = "More information", side = "top", align = "
|
|
|
444
593
|
)
|
|
445
594
|
}
|
|
446
595
|
),
|
|
447
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ jsx4(Popover.Portal, { children: /* @__PURE__ */ jsx4(Popover.Positioner, { side, align, sideOffset: 8, collisionPadding: 16, className: "z-50", children: /* @__PURE__ */ jsx4(
|
|
448
597
|
Popover.Popup,
|
|
449
598
|
{
|
|
450
599
|
"aria-label": label,
|
|
451
600
|
className: "max-w-[min(20rem,calc(100vw-2rem))] origin-[var(--transform-origin)] rounded-md border border-border bg-popover px-3 py-2 text-left text-xs font-normal leading-relaxed text-popover-foreground shadow-md outline-none transition-[opacity,transform] duration-150 ease-out data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0 motion-reduce:transition-none",
|
|
452
|
-
children: /* @__PURE__ */
|
|
601
|
+
children: /* @__PURE__ */ jsx4(Popover.Description, { children })
|
|
453
602
|
}
|
|
454
603
|
) }) })
|
|
455
604
|
] });
|
|
@@ -737,7 +886,7 @@ function useLadderRung(ladder, containerRef, options = {}) {
|
|
|
737
886
|
|
|
738
887
|
// src/ladder/flyout.tsx
|
|
739
888
|
import { useCallback as useCallback2, useEffect as useEffect4, useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef3, useState as useState5 } from "react";
|
|
740
|
-
import { jsx as
|
|
889
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
741
890
|
var PANEL_GAP = 4;
|
|
742
891
|
var HOVER_CLOSE_DELAY_MS = 300;
|
|
743
892
|
var HOVER_SLOP = 16;
|
|
@@ -837,7 +986,7 @@ function Flyout({
|
|
|
837
986
|
useEffect4(() => {
|
|
838
987
|
if (clickOpen && panelPosition) firstItemRef.current?.focus();
|
|
839
988
|
}, [clickOpen, panelPosition]);
|
|
840
|
-
return /* @__PURE__ */
|
|
989
|
+
return /* @__PURE__ */ jsxs5(
|
|
841
990
|
"div",
|
|
842
991
|
{
|
|
843
992
|
"data-testid": "ladder-flyout",
|
|
@@ -845,7 +994,7 @@ function Flyout({
|
|
|
845
994
|
onMouseEnter: hoverEnter,
|
|
846
995
|
onMouseLeave: hoverLeave,
|
|
847
996
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ jsxs5(
|
|
849
998
|
"button",
|
|
850
999
|
{
|
|
851
1000
|
ref: triggerRef,
|
|
@@ -871,7 +1020,7 @@ function Flyout({
|
|
|
871
1020
|
active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground"
|
|
872
1021
|
),
|
|
873
1022
|
children: [
|
|
874
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ jsx5(
|
|
875
1024
|
Icon,
|
|
876
1025
|
{
|
|
877
1026
|
className: cn(
|
|
@@ -882,7 +1031,7 @@ function Flyout({
|
|
|
882
1031
|
"aria-hidden": "true"
|
|
883
1032
|
}
|
|
884
1033
|
),
|
|
885
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ jsx5("span", { className: cn("truncate", collapsed && "sr-only"), children: label })
|
|
886
1035
|
]
|
|
887
1036
|
}
|
|
888
1037
|
),
|
|
@@ -891,7 +1040,7 @@ function Flyout({
|
|
|
891
1040
|
// the trigger's right edge (bridging PANEL_GAP) and pads HOVER_SLOP
|
|
892
1041
|
// around the panel; the panel itself renders exactly where it did.
|
|
893
1042
|
// `panelRef` lives here so a click in the slop isn't an "outside" one.
|
|
894
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ jsx5(
|
|
895
1044
|
"div",
|
|
896
1045
|
{
|
|
897
1046
|
ref: panelRef,
|
|
@@ -903,7 +1052,7 @@ function Flyout({
|
|
|
903
1052
|
left: panelPosition.left - PANEL_GAP,
|
|
904
1053
|
padding: `${HOVER_SLOP}px ${HOVER_SLOP}px ${HOVER_SLOP}px ${PANEL_GAP}px`
|
|
905
1054
|
},
|
|
906
|
-
children: /* @__PURE__ */
|
|
1055
|
+
children: /* @__PURE__ */ jsx5(
|
|
907
1056
|
"div",
|
|
908
1057
|
{
|
|
909
1058
|
id: panelId,
|
|
@@ -923,7 +1072,7 @@ function Flyout({
|
|
|
923
1072
|
// silently loses the focus-on-open behavior (a console ref
|
|
924
1073
|
// warning, not a crash) — same tradeoff any Link-injection
|
|
925
1074
|
// pattern accepts; not a regression from today's plain `<a>`.
|
|
926
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ jsx5(
|
|
927
1076
|
LinkEl,
|
|
928
1077
|
{
|
|
929
1078
|
ref: i === 0 ? firstItemRef : void 0,
|
|
@@ -949,7 +1098,7 @@ function Flyout({
|
|
|
949
1098
|
}
|
|
950
1099
|
|
|
951
1100
|
// src/app-sidebar.tsx
|
|
952
|
-
import { Fragment as Fragment2, jsx as
|
|
1101
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
953
1102
|
var DEFAULT_COLLAPSE_STORAGE_KEY = "reeve-sidebar-collapsed";
|
|
954
1103
|
var COLLAPSED_WIDTH_CLASS = "w-14";
|
|
955
1104
|
var EXPANDED_WIDTH_CLASS = "w-64";
|
|
@@ -967,7 +1116,7 @@ function NavLink({
|
|
|
967
1116
|
}) {
|
|
968
1117
|
const Icon = resolveIcon(icon);
|
|
969
1118
|
const LinkEl = linkComponent ?? "a";
|
|
970
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ jsxs6(
|
|
971
1120
|
LinkEl,
|
|
972
1121
|
{
|
|
973
1122
|
href,
|
|
@@ -987,7 +1136,7 @@ function NavLink({
|
|
|
987
1136
|
active ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-sidebar-foreground/70 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground"
|
|
988
1137
|
),
|
|
989
1138
|
children: [
|
|
990
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ jsx6(
|
|
991
1140
|
Icon,
|
|
992
1141
|
{
|
|
993
1142
|
className: cn(
|
|
@@ -998,7 +1147,7 @@ function NavLink({
|
|
|
998
1147
|
"aria-hidden": "true"
|
|
999
1148
|
}
|
|
1000
1149
|
),
|
|
1001
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ jsx6("span", { className: cn("truncate", collapsed && "sr-only"), children: label })
|
|
1002
1151
|
]
|
|
1003
1152
|
}
|
|
1004
1153
|
);
|
|
@@ -1089,7 +1238,7 @@ function AppSidebar({
|
|
|
1089
1238
|
function renderAppItem(item, testIdPrefix, collapsedRow = false) {
|
|
1090
1239
|
const def = moduleMap.get(item.moduleId);
|
|
1091
1240
|
if (!def) return null;
|
|
1092
|
-
return /* @__PURE__ */
|
|
1241
|
+
return /* @__PURE__ */ jsx6(
|
|
1093
1242
|
NavLink,
|
|
1094
1243
|
{
|
|
1095
1244
|
href: def.href,
|
|
@@ -1115,7 +1264,7 @@ function AppSidebar({
|
|
|
1115
1264
|
};
|
|
1116
1265
|
});
|
|
1117
1266
|
const active = children.some((c) => c.active);
|
|
1118
|
-
return /* @__PURE__ */
|
|
1267
|
+
return /* @__PURE__ */ jsx6(
|
|
1119
1268
|
Flyout,
|
|
1120
1269
|
{
|
|
1121
1270
|
label: item.label,
|
|
@@ -1134,7 +1283,7 @@ function AppSidebar({
|
|
|
1134
1283
|
function brandBlockFor(collapsedMode) {
|
|
1135
1284
|
if (!brand) return null;
|
|
1136
1285
|
if (collapsedMode) {
|
|
1137
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsxs6(
|
|
1138
1287
|
"a",
|
|
1139
1288
|
{
|
|
1140
1289
|
href: brand.href,
|
|
@@ -1142,28 +1291,28 @@ function AppSidebar({
|
|
|
1142
1291
|
title: brand.label,
|
|
1143
1292
|
className: "flex items-center justify-center border-b border-sidebar-border px-1 py-4",
|
|
1144
1293
|
children: [
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ jsx6("span", { className: "sr-only", children: brand.label }),
|
|
1295
|
+
/* @__PURE__ */ jsx6(BrandGlyph, { brand: { name: brand.label }, size: "xl" })
|
|
1147
1296
|
]
|
|
1148
1297
|
}
|
|
1149
1298
|
);
|
|
1150
1299
|
}
|
|
1151
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ jsxs6(
|
|
1152
1301
|
"a",
|
|
1153
1302
|
{
|
|
1154
1303
|
href: brand.href,
|
|
1155
1304
|
"data-testid": "app-sidebar-brand",
|
|
1156
1305
|
className: "flex items-center gap-2.5 border-b border-sidebar-border px-5 py-4 text-sidebar-foreground",
|
|
1157
1306
|
children: [
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ jsx6("span", { className: "grid size-7 place-items-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx6("span", { className: "font-mono text-sm font-bold", children: (brand.label[0] ?? "r").toUpperCase() }) }),
|
|
1308
|
+
/* @__PURE__ */ jsx6("span", { className: "truncate text-sm font-semibold tracking-tight", children: brand.label })
|
|
1160
1309
|
]
|
|
1161
1310
|
}
|
|
1162
1311
|
);
|
|
1163
1312
|
}
|
|
1164
1313
|
function topItemBlock(testId, collapsedMode = false) {
|
|
1165
1314
|
if (!topItem) return null;
|
|
1166
|
-
return /* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ jsx6("div", { className: cn("px-3 pt-4", collapsedMode && "flex justify-center px-0"), children: /* @__PURE__ */ jsx6(
|
|
1167
1316
|
NavLink,
|
|
1168
1317
|
{
|
|
1169
1318
|
href: topItem.href,
|
|
@@ -1176,8 +1325,8 @@ function AppSidebar({
|
|
|
1176
1325
|
}
|
|
1177
1326
|
) });
|
|
1178
1327
|
}
|
|
1179
|
-
return /* @__PURE__ */
|
|
1180
|
-
!isDesktop && /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1329
|
+
!isDesktop && /* @__PURE__ */ jsx6(
|
|
1181
1330
|
"button",
|
|
1182
1331
|
{
|
|
1183
1332
|
ref: mobileTriggerRef,
|
|
@@ -1189,11 +1338,11 @@ function AppSidebar({
|
|
|
1189
1338
|
onClick: () => setMobileOpen((v) => !v),
|
|
1190
1339
|
style: TOUCH_TARGET_STYLE,
|
|
1191
1340
|
className: "flex items-center justify-center rounded-md border border-border p-2 text-foreground",
|
|
1192
|
-
children: mobileOpen ? /* @__PURE__ */
|
|
1341
|
+
children: mobileOpen ? /* @__PURE__ */ jsx6(X2, { className: "h-5 w-5", "aria-hidden": "true" }) : /* @__PURE__ */ jsx6(Menu2, { className: "h-5 w-5", "aria-hidden": "true" })
|
|
1193
1342
|
}
|
|
1194
1343
|
),
|
|
1195
|
-
!isDesktop && mobileOpen && /* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */
|
|
1344
|
+
!isDesktop && mobileOpen && /* @__PURE__ */ jsxs6("div", { className: "fixed inset-0 z-50", children: [
|
|
1345
|
+
/* @__PURE__ */ jsx6(
|
|
1197
1346
|
"div",
|
|
1198
1347
|
{
|
|
1199
1348
|
"data-testid": "app-sidebar-mobile-scrim",
|
|
@@ -1202,7 +1351,7 @@ function AppSidebar({
|
|
|
1202
1351
|
onClick: () => setMobileOpen(false)
|
|
1203
1352
|
}
|
|
1204
1353
|
),
|
|
1205
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ jsxs6(
|
|
1206
1355
|
"div",
|
|
1207
1356
|
{
|
|
1208
1357
|
ref: mobileDrawerRef,
|
|
@@ -1213,7 +1362,7 @@ function AppSidebar({
|
|
|
1213
1362
|
"data-testid": "app-sidebar-mobile-drawer",
|
|
1214
1363
|
className: "absolute inset-y-0 left-0 flex w-72 flex-col overflow-y-auto border-r border-sidebar-border bg-sidebar",
|
|
1215
1364
|
children: [
|
|
1216
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ jsx6("div", { className: "sticky top-0 z-10 flex justify-end bg-sidebar p-2", children: /* @__PURE__ */ jsx6(
|
|
1217
1366
|
"button",
|
|
1218
1367
|
{
|
|
1219
1368
|
ref: mobileCloseRef,
|
|
@@ -1223,19 +1372,19 @@ function AppSidebar({
|
|
|
1223
1372
|
onClick: () => setMobileOpen(false),
|
|
1224
1373
|
style: TOUCH_TARGET_STYLE,
|
|
1225
1374
|
className: "flex items-center justify-center rounded-md p-2 text-sidebar-foreground/70 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground",
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1375
|
+
children: /* @__PURE__ */ jsx6(X2, { className: "h-5 w-5", "aria-hidden": "true" })
|
|
1227
1376
|
}
|
|
1228
1377
|
) }),
|
|
1229
1378
|
brandBlockFor(false),
|
|
1230
1379
|
topItemBlock("app-sidebar-mobile-top-item"),
|
|
1231
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ jsx6("nav", { className: "flex-1 px-3 py-4", children: /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-0.5", children: rung0.items.map(
|
|
1232
1381
|
(item) => item.type === "app" ? renderAppItem(item, "app-sidebar-mobile-navlink") : null
|
|
1233
1382
|
) }) })
|
|
1234
1383
|
]
|
|
1235
1384
|
}
|
|
1236
1385
|
)
|
|
1237
1386
|
] }),
|
|
1238
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsxs6(
|
|
1239
1388
|
"aside",
|
|
1240
1389
|
{
|
|
1241
1390
|
"data-testid": "app-sidebar-desktop",
|
|
@@ -1250,18 +1399,18 @@ function AppSidebar({
|
|
|
1250
1399
|
children: [
|
|
1251
1400
|
brandBlockFor(collapsed),
|
|
1252
1401
|
topItemBlock("app-sidebar-top-item", collapsed),
|
|
1253
|
-
/* @__PURE__ */
|
|
1402
|
+
/* @__PURE__ */ jsx6(
|
|
1254
1403
|
"nav",
|
|
1255
1404
|
{
|
|
1256
1405
|
ref: containerRef,
|
|
1257
1406
|
"data-testid": "app-sidebar-nav",
|
|
1258
1407
|
className: "flex-1 overflow-y-auto px-3 py-4",
|
|
1259
|
-
children: /* @__PURE__ */
|
|
1408
|
+
children: /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-0.5", children: rung.items.map(
|
|
1260
1409
|
(item) => item.type === "app" ? renderAppItem(item, "app-sidebar-navlink", collapsed) : renderGroupItem(item, collapsed)
|
|
1261
1410
|
) })
|
|
1262
1411
|
}
|
|
1263
1412
|
),
|
|
1264
|
-
collapsible && /* @__PURE__ */
|
|
1413
|
+
collapsible && /* @__PURE__ */ jsx6("div", { className: "border-t border-sidebar-border px-2 py-2", children: /* @__PURE__ */ jsxs6(
|
|
1265
1414
|
"button",
|
|
1266
1415
|
{
|
|
1267
1416
|
type: "button",
|
|
@@ -1275,8 +1424,8 @@ function AppSidebar({
|
|
|
1275
1424
|
collapsed && "justify-center px-0"
|
|
1276
1425
|
),
|
|
1277
1426
|
children: [
|
|
1278
|
-
collapsed ? /* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1427
|
+
collapsed ? /* @__PURE__ */ jsx6(PanelLeftOpen, { className: "size-4 shrink-0", strokeWidth: 1.5, "aria-hidden": "true" }) : /* @__PURE__ */ jsx6(PanelLeftClose, { className: "size-4 shrink-0", strokeWidth: 1.5, "aria-hidden": "true" }),
|
|
1428
|
+
/* @__PURE__ */ jsx6("span", { className: cn("truncate", collapsed && "sr-only"), children: collapsed ? "Expand sidebar" : "Collapse sidebar" })
|
|
1280
1429
|
]
|
|
1281
1430
|
}
|
|
1282
1431
|
) })
|
|
@@ -1319,19 +1468,19 @@ function groupItemsByOrg(rows, get) {
|
|
|
1319
1468
|
|
|
1320
1469
|
// src/lib/dropdown-menu.tsx
|
|
1321
1470
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1322
|
-
import { jsx as
|
|
1471
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1323
1472
|
function DropdownMenu(props) {
|
|
1324
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1325
1474
|
}
|
|
1326
1475
|
function DropdownMenuTrigger(props) {
|
|
1327
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1328
1477
|
}
|
|
1329
1478
|
function DropdownMenuContent({
|
|
1330
1479
|
className,
|
|
1331
1480
|
sideOffset = 4,
|
|
1332
1481
|
...props
|
|
1333
1482
|
}) {
|
|
1334
|
-
return /* @__PURE__ */
|
|
1483
|
+
return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx7(
|
|
1335
1484
|
DropdownMenuPrimitive.Content,
|
|
1336
1485
|
{
|
|
1337
1486
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1348,7 +1497,7 @@ function DropdownMenuItem({
|
|
|
1348
1497
|
className,
|
|
1349
1498
|
...props
|
|
1350
1499
|
}) {
|
|
1351
|
-
return /* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ jsx7(
|
|
1352
1501
|
DropdownMenuPrimitive.Item,
|
|
1353
1502
|
{
|
|
1354
1503
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1364,7 +1513,7 @@ function DropdownMenuLabel({
|
|
|
1364
1513
|
className,
|
|
1365
1514
|
...props
|
|
1366
1515
|
}) {
|
|
1367
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ jsx7(
|
|
1368
1517
|
DropdownMenuPrimitive.Label,
|
|
1369
1518
|
{
|
|
1370
1519
|
"data-slot": "dropdown-menu-label",
|
|
@@ -1375,7 +1524,7 @@ function DropdownMenuLabel({
|
|
|
1375
1524
|
}
|
|
1376
1525
|
|
|
1377
1526
|
// src/context-switcher.tsx
|
|
1378
|
-
import { Fragment as Fragment3, jsx as
|
|
1527
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1379
1528
|
function groupByOrg(items) {
|
|
1380
1529
|
return groupItemsByOrg(items, {
|
|
1381
1530
|
orgId: (it) => it.orgId,
|
|
@@ -1407,29 +1556,29 @@ function ContextSwitcher({
|
|
|
1407
1556
|
const active = items.find((it) => it.refId === activeRefId) ?? null;
|
|
1408
1557
|
const groups = groupByOrg(items);
|
|
1409
1558
|
const showOrgHeaders = groups.length > 1;
|
|
1410
|
-
return /* @__PURE__ */
|
|
1411
|
-
/* @__PURE__ */
|
|
1559
|
+
return /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
|
|
1560
|
+
/* @__PURE__ */ jsx8(DropdownMenuTrigger, { asChild: true, children: collapsed ? /* @__PURE__ */ jsx8(
|
|
1412
1561
|
"button",
|
|
1413
1562
|
{
|
|
1414
1563
|
type: "button",
|
|
1415
1564
|
title: active?.name || placeholder,
|
|
1416
1565
|
"aria-label": active?.name || placeholder,
|
|
1417
1566
|
className: "flex h-10 w-10 items-center justify-center rounded-lg text-sidebar-foreground/70 transition-colors hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground",
|
|
1418
|
-
children: /* @__PURE__ */
|
|
1567
|
+
children: /* @__PURE__ */ jsx8(BrandGlyph, { brand: toBrand(active ?? { name: "" }), size: "lg" })
|
|
1419
1568
|
}
|
|
1420
|
-
) : /* @__PURE__ */
|
|
1569
|
+
) : /* @__PURE__ */ jsxs7(
|
|
1421
1570
|
"button",
|
|
1422
1571
|
{
|
|
1423
1572
|
type: "button",
|
|
1424
1573
|
className: "group flex items-center gap-2 rounded-md border border-sidebar-border bg-sidebar-accent/60 px-2.5 py-1.5 text-sm font-medium transition-colors hover:bg-sidebar",
|
|
1425
1574
|
children: [
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
/* @__PURE__ */
|
|
1428
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx8(BrandGlyph, { brand: toBrand(active ?? { name: "" }) }),
|
|
1576
|
+
/* @__PURE__ */ jsx8("span", { className: "max-w-[140px] truncate text-sidebar-accent-foreground", children: active?.name || placeholder }),
|
|
1577
|
+
/* @__PURE__ */ jsx8(ChevronDown, { className: "h-3.5 w-3.5 text-sidebar-foreground/70 transition-transform group-data-[state=open]:rotate-180" })
|
|
1429
1578
|
]
|
|
1430
1579
|
}
|
|
1431
1580
|
) }),
|
|
1432
|
-
/* @__PURE__ */
|
|
1581
|
+
/* @__PURE__ */ jsxs7(
|
|
1433
1582
|
DropdownMenuContent,
|
|
1434
1583
|
{
|
|
1435
1584
|
side,
|
|
@@ -1438,13 +1587,13 @@ function ContextSwitcher({
|
|
|
1438
1587
|
collisionPadding: 8,
|
|
1439
1588
|
className: cn("w-60 overflow-hidden p-0", contentClassName),
|
|
1440
1589
|
children: [
|
|
1441
|
-
groups.map((group) => /* @__PURE__ */
|
|
1442
|
-
showOrgHeaders && /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1590
|
+
groups.map((group) => /* @__PURE__ */ jsxs7("div", { children: [
|
|
1591
|
+
showOrgHeaders && /* @__PURE__ */ jsx8(DropdownMenuLabel, { className: "px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: group.orgName ?? "Other" }),
|
|
1592
|
+
/* @__PURE__ */ jsx8("div", { className: cn(showOrgHeaders && "ml-5 border-l border-border/60"), children: group.items.map((item, i) => {
|
|
1444
1593
|
const isActive = item.refId === activeRefId;
|
|
1445
1594
|
const next = group.items[i + 1];
|
|
1446
1595
|
const endsPinned = item.pinned === true && next !== void 0 && next.pinned !== true;
|
|
1447
|
-
return /* @__PURE__ */
|
|
1596
|
+
return /* @__PURE__ */ jsxs7(
|
|
1448
1597
|
DropdownMenuItem,
|
|
1449
1598
|
{
|
|
1450
1599
|
"data-active": isActive || void 0,
|
|
@@ -1456,8 +1605,8 @@ function ContextSwitcher({
|
|
|
1456
1605
|
endsPinned && "border-b border-border/60"
|
|
1457
1606
|
),
|
|
1458
1607
|
children: [
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsx8(BrandGlyph, { brand: toBrand(item), subtle: true }),
|
|
1609
|
+
/* @__PURE__ */ jsx8(
|
|
1461
1610
|
"span",
|
|
1462
1611
|
{
|
|
1463
1612
|
className: cn(
|
|
@@ -1467,18 +1616,18 @@ function ContextSwitcher({
|
|
|
1467
1616
|
children: item.name
|
|
1468
1617
|
}
|
|
1469
1618
|
),
|
|
1470
|
-
item.kindLabel && /* @__PURE__ */
|
|
1619
|
+
item.kindLabel && /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1471
1620
|
" ",
|
|
1472
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ jsx8("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: item.kindLabel })
|
|
1473
1622
|
] }),
|
|
1474
|
-
isActive && /* @__PURE__ */
|
|
1623
|
+
isActive && /* @__PURE__ */ jsx8(Check, { className: "size-3.5 text-emerald-500" })
|
|
1475
1624
|
]
|
|
1476
1625
|
},
|
|
1477
1626
|
item.refId
|
|
1478
1627
|
);
|
|
1479
1628
|
}) })
|
|
1480
1629
|
] }, group.orgId ?? "unattributed")),
|
|
1481
|
-
footer && /* @__PURE__ */
|
|
1630
|
+
footer && /* @__PURE__ */ jsx8("div", { className: "sticky bottom-0 border-t border-border bg-popover", children: footer })
|
|
1482
1631
|
]
|
|
1483
1632
|
}
|
|
1484
1633
|
)
|
|
@@ -1487,7 +1636,7 @@ function ContextSwitcher({
|
|
|
1487
1636
|
|
|
1488
1637
|
// src/connector-picker.tsx
|
|
1489
1638
|
import { useCallback as useCallback4, useEffect as useEffect6, useRef as useRef5, useState as useState7 } from "react";
|
|
1490
|
-
import { Fragment as Fragment4, jsx as
|
|
1639
|
+
import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1491
1640
|
function accessLabel(access) {
|
|
1492
1641
|
return access === "read" ? "Read" : "Read + write";
|
|
1493
1642
|
}
|
|
@@ -1748,35 +1897,35 @@ function ConnectorPicker({
|
|
|
1748
1897
|
);
|
|
1749
1898
|
const ownEntries = entries?.filter((entry) => !isSharedWithViewer(entry)) ?? null;
|
|
1750
1899
|
const sharedEntries = entries?.filter(isSharedWithViewer) ?? [];
|
|
1751
|
-
return /* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
entries === null && !loadError && Array.from({ length: SKELETON_COUNT }).map((_, i) => /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsxs8("div", { "data-testid": "connector-picker", "data-layout": layout, className: "flex flex-col gap-4", children: [
|
|
1901
|
+
/* @__PURE__ */ jsxs8("div", { className: containerClassName, children: [
|
|
1902
|
+
entries === null && !loadError && Array.from({ length: SKELETON_COUNT }).map((_, i) => /* @__PURE__ */ jsxs8(
|
|
1754
1903
|
"div",
|
|
1755
1904
|
{
|
|
1756
1905
|
"data-testid": "connector-picker-skeleton-item",
|
|
1757
1906
|
"aria-hidden": "true",
|
|
1758
1907
|
className: "flex items-center gap-3 rounded-lg border border-border p-3",
|
|
1759
1908
|
children: [
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ jsx9("span", { className: "h-8 w-8 shrink-0 animate-pulse rounded bg-foreground/10" }),
|
|
1910
|
+
/* @__PURE__ */ jsx9("span", { className: "h-3 flex-1 animate-pulse rounded bg-foreground/10" })
|
|
1762
1911
|
]
|
|
1763
1912
|
},
|
|
1764
1913
|
i
|
|
1765
1914
|
)),
|
|
1766
|
-
loadError && /* @__PURE__ */
|
|
1915
|
+
loadError && /* @__PURE__ */ jsxs8(
|
|
1767
1916
|
"div",
|
|
1768
1917
|
{
|
|
1769
1918
|
role: "alert",
|
|
1770
1919
|
"data-testid": "connector-picker-load-error",
|
|
1771
1920
|
className: "flex items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-3 text-sm text-destructive",
|
|
1772
1921
|
children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ jsx9("span", { children: loadError }),
|
|
1923
|
+
/* @__PURE__ */ jsx9("button", { type: "button", onClick: () => void load(), className: "shrink-0 underline", children: "Retry" })
|
|
1775
1924
|
]
|
|
1776
1925
|
}
|
|
1777
1926
|
),
|
|
1778
|
-
entries !== null && entries.length === 0 && !loadError && /* @__PURE__ */
|
|
1779
|
-
ownEntries?.map((entry) => /* @__PURE__ */
|
|
1927
|
+
entries !== null && entries.length === 0 && !loadError && /* @__PURE__ */ jsx9("p", { "data-testid": "connector-picker-empty", className: "text-sm text-muted-foreground", children: "No connections available." }),
|
|
1928
|
+
ownEntries?.map((entry) => /* @__PURE__ */ jsx9(
|
|
1780
1929
|
ConnectorTile,
|
|
1781
1930
|
{
|
|
1782
1931
|
entry,
|
|
@@ -1796,9 +1945,9 @@ function ConnectorPicker({
|
|
|
1796
1945
|
entry.slug
|
|
1797
1946
|
))
|
|
1798
1947
|
] }),
|
|
1799
|
-
sharedEntries.length > 0 && /* @__PURE__ */
|
|
1800
|
-
/* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1948
|
+
sharedEntries.length > 0 && /* @__PURE__ */ jsxs8("section", { "data-testid": "connector-picker-shared-with-me", className: "flex flex-col gap-2", children: [
|
|
1949
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Shared with me" }),
|
|
1950
|
+
/* @__PURE__ */ jsx9("div", { className: containerClassName, children: sharedEntries.map((entry) => /* @__PURE__ */ jsx9(
|
|
1802
1951
|
ConnectorTile,
|
|
1803
1952
|
{
|
|
1804
1953
|
entry,
|
|
@@ -1857,7 +2006,7 @@ function ConnectorTile({
|
|
|
1857
2006
|
const attribution = ownerLabel(entry);
|
|
1858
2007
|
const canDisconnect = isConnected && !shared;
|
|
1859
2008
|
const canManageSharing = isConnected && entry.connection.owned_by_viewer === true && grantsSupported;
|
|
1860
|
-
return /* @__PURE__ */
|
|
2009
|
+
return /* @__PURE__ */ jsxs8(
|
|
1861
2010
|
"div",
|
|
1862
2011
|
{
|
|
1863
2012
|
"data-testid": `connector-tile-${entry.slug}`,
|
|
@@ -1865,12 +2014,12 @@ function ConnectorTile({
|
|
|
1865
2014
|
"data-deprecated": entry.deprecated || void 0,
|
|
1866
2015
|
className: cn("flex flex-col p-3", layout === "tiles" && "rounded-lg border border-border"),
|
|
1867
2016
|
children: [
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
1873
|
-
entry.deprecated && /* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3", children: [
|
|
2018
|
+
/* @__PURE__ */ jsx9(BrandGlyph, { brand: { name: entry.name, logo: entry.logo }, size: "lg" }),
|
|
2019
|
+
/* @__PURE__ */ jsxs8("div", { className: "min-w-0 flex-1", children: [
|
|
2020
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
2021
|
+
/* @__PURE__ */ jsx9("p", { className: "truncate text-sm font-medium", children: entry.name }),
|
|
2022
|
+
entry.deprecated && /* @__PURE__ */ jsx9(
|
|
1874
2023
|
"span",
|
|
1875
2024
|
{
|
|
1876
2025
|
"data-testid": `connector-deprecated-${entry.slug}`,
|
|
@@ -1879,24 +2028,24 @@ function ConnectorTile({
|
|
|
1879
2028
|
}
|
|
1880
2029
|
)
|
|
1881
2030
|
] }),
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
(isConnected || choices.length === 0) && /* @__PURE__ */
|
|
1884
|
-
isConnected && /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
/* @__PURE__ */
|
|
2031
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
2032
|
+
(isConnected || choices.length === 0) && /* @__PURE__ */ jsx9("span", { "data-testid": `connector-capability-${entry.slug}`, children: accessLabel(tileAccess(entry)) }),
|
|
2033
|
+
isConnected && /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
2034
|
+
/* @__PURE__ */ jsx9("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
2035
|
+
/* @__PURE__ */ jsxs8(
|
|
1887
2036
|
"span",
|
|
1888
2037
|
{
|
|
1889
2038
|
"data-testid": `connector-connected-${entry.slug}`,
|
|
1890
2039
|
className: "inline-flex items-center gap-1",
|
|
1891
2040
|
children: [
|
|
1892
|
-
/* @__PURE__ */
|
|
2041
|
+
/* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "h-1.5 w-1.5 rounded-full bg-emerald-500" }),
|
|
1893
2042
|
"Connected"
|
|
1894
2043
|
]
|
|
1895
2044
|
}
|
|
1896
2045
|
)
|
|
1897
2046
|
] })
|
|
1898
2047
|
] }),
|
|
1899
|
-
isConnected && !shared && entry.connection.account_label && /* @__PURE__ */
|
|
2048
|
+
isConnected && !shared && entry.connection.account_label && /* @__PURE__ */ jsxs8(
|
|
1900
2049
|
"p",
|
|
1901
2050
|
{
|
|
1902
2051
|
"data-testid": `connector-account-${entry.slug}`,
|
|
@@ -1907,7 +2056,7 @@ function ConnectorTile({
|
|
|
1907
2056
|
]
|
|
1908
2057
|
}
|
|
1909
2058
|
),
|
|
1910
|
-
isConnected && entry.access_summary && /* @__PURE__ */
|
|
2059
|
+
isConnected && entry.access_summary && /* @__PURE__ */ jsx9(
|
|
1911
2060
|
"p",
|
|
1912
2061
|
{
|
|
1913
2062
|
"data-testid": `connector-access-summary-${entry.slug}`,
|
|
@@ -1915,7 +2064,7 @@ function ConnectorTile({
|
|
|
1915
2064
|
children: entry.access_summary
|
|
1916
2065
|
}
|
|
1917
2066
|
),
|
|
1918
|
-
unhealthy && /* @__PURE__ */
|
|
2067
|
+
unhealthy && /* @__PURE__ */ jsx9(
|
|
1919
2068
|
"p",
|
|
1920
2069
|
{
|
|
1921
2070
|
role: "alert",
|
|
@@ -1924,7 +2073,7 @@ function ConnectorTile({
|
|
|
1924
2073
|
children: DEFAULT_RECONNECT_MESSAGE
|
|
1925
2074
|
}
|
|
1926
2075
|
),
|
|
1927
|
-
attribution && /* @__PURE__ */
|
|
2076
|
+
attribution && /* @__PURE__ */ jsx9(
|
|
1928
2077
|
"p",
|
|
1929
2078
|
{
|
|
1930
2079
|
"data-testid": `connector-owner-${entry.slug}`,
|
|
@@ -1932,14 +2081,14 @@ function ConnectorTile({
|
|
|
1932
2081
|
children: attribution
|
|
1933
2082
|
}
|
|
1934
2083
|
),
|
|
1935
|
-
!isConnected && choices.length > 0 && /* @__PURE__ */
|
|
2084
|
+
!isConnected && choices.length > 0 && /* @__PURE__ */ jsx9(
|
|
1936
2085
|
"div",
|
|
1937
2086
|
{
|
|
1938
2087
|
"data-testid": `connector-access-choice-${entry.slug}`,
|
|
1939
2088
|
role: "group",
|
|
1940
2089
|
"aria-label": "Access",
|
|
1941
2090
|
className: "mt-1 flex items-center gap-1",
|
|
1942
|
-
children: choices.map((option) => /* @__PURE__ */
|
|
2091
|
+
children: choices.map((option) => /* @__PURE__ */ jsx9(
|
|
1943
2092
|
"button",
|
|
1944
2093
|
{
|
|
1945
2094
|
type: "button",
|
|
@@ -1958,7 +2107,7 @@ function ConnectorTile({
|
|
|
1958
2107
|
))
|
|
1959
2108
|
}
|
|
1960
2109
|
),
|
|
1961
|
-
!isConnected && orgPermitted && /* @__PURE__ */
|
|
2110
|
+
!isConnected && orgPermitted && /* @__PURE__ */ jsxs8(
|
|
1962
2111
|
"div",
|
|
1963
2112
|
{
|
|
1964
2113
|
"data-testid": `connector-kind-toggle-${entry.slug}`,
|
|
@@ -1966,7 +2115,7 @@ function ConnectorTile({
|
|
|
1966
2115
|
"aria-label": "Connect as",
|
|
1967
2116
|
className: "mt-1 flex items-center gap-1",
|
|
1968
2117
|
children: [
|
|
1969
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ jsx9(
|
|
1970
2119
|
"button",
|
|
1971
2120
|
{
|
|
1972
2121
|
type: "button",
|
|
@@ -1983,7 +2132,7 @@ function ConnectorTile({
|
|
|
1983
2132
|
children: "Personal"
|
|
1984
2133
|
}
|
|
1985
2134
|
),
|
|
1986
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ jsx9(
|
|
1987
2136
|
"button",
|
|
1988
2137
|
{
|
|
1989
2138
|
type: "button",
|
|
@@ -2003,10 +2152,10 @@ function ConnectorTile({
|
|
|
2003
2152
|
]
|
|
2004
2153
|
}
|
|
2005
2154
|
),
|
|
2006
|
-
errorMessage && /* @__PURE__ */
|
|
2155
|
+
errorMessage && /* @__PURE__ */ jsx9("p", { role: "alert", "data-testid": `connector-error-${entry.slug}`, className: "text-xs text-destructive", children: errorMessage })
|
|
2007
2156
|
] }),
|
|
2008
|
-
isConnected ? /* @__PURE__ */
|
|
2009
|
-
unhealthy && !shared && /* @__PURE__ */
|
|
2157
|
+
isConnected ? /* @__PURE__ */ jsxs8("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
|
|
2158
|
+
unhealthy && !shared && /* @__PURE__ */ jsx9(
|
|
2010
2159
|
"button",
|
|
2011
2160
|
{
|
|
2012
2161
|
type: "button",
|
|
@@ -2021,7 +2170,7 @@ function ConnectorTile({
|
|
|
2021
2170
|
// as an always-visible paragraph it wrapped to four lines
|
|
2022
2171
|
// beside every connected tile. Muted until hover so a
|
|
2023
2172
|
// destructive action isn't the loudest thing on the tile.
|
|
2024
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ jsx9(
|
|
2025
2174
|
"button",
|
|
2026
2175
|
{
|
|
2027
2176
|
type: "button",
|
|
@@ -2033,7 +2182,7 @@ function ConnectorTile({
|
|
|
2033
2182
|
children: isDisconnecting ? "Disconnecting\u2026" : "Disconnect"
|
|
2034
2183
|
}
|
|
2035
2184
|
),
|
|
2036
|
-
canManageSharing && /* @__PURE__ */
|
|
2185
|
+
canManageSharing && /* @__PURE__ */ jsx9(
|
|
2037
2186
|
"button",
|
|
2038
2187
|
{
|
|
2039
2188
|
type: "button",
|
|
@@ -2044,8 +2193,8 @@ function ConnectorTile({
|
|
|
2044
2193
|
children: sharingOpen ? "Hide sharing" : "Manage sharing"
|
|
2045
2194
|
}
|
|
2046
2195
|
)
|
|
2047
|
-
] }) : /* @__PURE__ */
|
|
2048
|
-
/* @__PURE__ */
|
|
2196
|
+
] }) : /* @__PURE__ */ jsxs8("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
|
|
2197
|
+
/* @__PURE__ */ jsx9(
|
|
2049
2198
|
"button",
|
|
2050
2199
|
{
|
|
2051
2200
|
type: "button",
|
|
@@ -2056,7 +2205,7 @@ function ConnectorTile({
|
|
|
2056
2205
|
children: isConnecting ? "Connecting\u2026" : "Connect"
|
|
2057
2206
|
}
|
|
2058
2207
|
),
|
|
2059
|
-
canSetUp && /* @__PURE__ */
|
|
2208
|
+
canSetUp && /* @__PURE__ */ jsx9(
|
|
2060
2209
|
"button",
|
|
2061
2210
|
{
|
|
2062
2211
|
type: "button",
|
|
@@ -2070,15 +2219,15 @@ function ConnectorTile({
|
|
|
2070
2219
|
)
|
|
2071
2220
|
] })
|
|
2072
2221
|
] }),
|
|
2073
|
-
canSetUp && setupOpen && /* @__PURE__ */
|
|
2222
|
+
canSetUp && setupOpen && /* @__PURE__ */ jsxs8(
|
|
2074
2223
|
"div",
|
|
2075
2224
|
{
|
|
2076
2225
|
id: `connector-setup-panel-${entry.slug}`,
|
|
2077
2226
|
"data-testid": `connector-setup-panel-${entry.slug}`,
|
|
2078
2227
|
className: "mt-2 flex flex-col gap-3 rounded-md border border-border bg-foreground/5 p-2",
|
|
2079
2228
|
children: [
|
|
2080
|
-
guide && /* @__PURE__ */
|
|
2081
|
-
pasteSupported && /* @__PURE__ */
|
|
2229
|
+
guide && /* @__PURE__ */ jsx9(SetupGuidePanel, { entry, guide, showVerify: !pasteSupported }),
|
|
2230
|
+
pasteSupported && /* @__PURE__ */ jsx9(
|
|
2082
2231
|
CredentialForm,
|
|
2083
2232
|
{
|
|
2084
2233
|
entry,
|
|
@@ -2093,7 +2242,7 @@ function ConnectorTile({
|
|
|
2093
2242
|
]
|
|
2094
2243
|
}
|
|
2095
2244
|
),
|
|
2096
|
-
canManageSharing && sharingOpen && /* @__PURE__ */
|
|
2245
|
+
canManageSharing && sharingOpen && /* @__PURE__ */ jsx9(
|
|
2097
2246
|
ManageSharing,
|
|
2098
2247
|
{
|
|
2099
2248
|
entry,
|
|
@@ -2143,8 +2292,8 @@ function CopyableValue({ value, testId }) {
|
|
|
2143
2292
|
setCopied(false);
|
|
2144
2293
|
}
|
|
2145
2294
|
}, [value]);
|
|
2146
|
-
return /* @__PURE__ */
|
|
2147
|
-
/* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsxs8("span", { className: "mt-1 flex items-center gap-1.5", children: [
|
|
2296
|
+
/* @__PURE__ */ jsx9(
|
|
2148
2297
|
"code",
|
|
2149
2298
|
{
|
|
2150
2299
|
"data-testid": `${testId}-value`,
|
|
@@ -2152,7 +2301,7 @@ function CopyableValue({ value, testId }) {
|
|
|
2152
2301
|
children: value
|
|
2153
2302
|
}
|
|
2154
2303
|
),
|
|
2155
|
-
/* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ jsx9(
|
|
2156
2305
|
"button",
|
|
2157
2306
|
{
|
|
2158
2307
|
type: "button",
|
|
@@ -2178,8 +2327,8 @@ function SetupGuidePanel({
|
|
|
2178
2327
|
ungrounded
|
|
2179
2328
|
);
|
|
2180
2329
|
}, [entry.slug, guide, leaked]);
|
|
2181
|
-
return /* @__PURE__ */
|
|
2182
|
-
leaked && isDevEnvironment() && /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ jsxs8("div", { "data-testid": `connector-guide-${entry.slug}`, className: "flex flex-col gap-2", children: [
|
|
2331
|
+
leaked && isDevEnvironment() && /* @__PURE__ */ jsxs8(
|
|
2183
2332
|
"p",
|
|
2184
2333
|
{
|
|
2185
2334
|
role: "alert",
|
|
@@ -2191,25 +2340,25 @@ function SetupGuidePanel({
|
|
|
2191
2340
|
]
|
|
2192
2341
|
}
|
|
2193
2342
|
),
|
|
2194
|
-
prerequisites.length > 0 && /* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2343
|
+
prerequisites.length > 0 && /* @__PURE__ */ jsxs8("div", { children: [
|
|
2344
|
+
/* @__PURE__ */ jsx9("h4", { className: "text-xs font-medium", children: "Before you start" }),
|
|
2345
|
+
/* @__PURE__ */ jsx9(
|
|
2197
2346
|
"ul",
|
|
2198
2347
|
{
|
|
2199
2348
|
"data-testid": `connector-guide-prerequisites-${entry.slug}`,
|
|
2200
2349
|
className: "mt-1 list-disc pl-4 text-xs text-muted-foreground",
|
|
2201
|
-
children: prerequisites.map((item) => /* @__PURE__ */
|
|
2350
|
+
children: prerequisites.map((item) => /* @__PURE__ */ jsx9("li", { children: item }, item))
|
|
2202
2351
|
}
|
|
2203
2352
|
)
|
|
2204
2353
|
] }),
|
|
2205
|
-
steps.length > 0 && /* @__PURE__ */
|
|
2354
|
+
steps.length > 0 && /* @__PURE__ */ jsx9(
|
|
2206
2355
|
"ol",
|
|
2207
2356
|
{
|
|
2208
2357
|
"data-testid": `connector-guide-steps-${entry.slug}`,
|
|
2209
2358
|
className: "list-decimal pl-4 text-xs",
|
|
2210
|
-
children: steps.map((step, index) => /* @__PURE__ */
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
-
step.copyable && /* @__PURE__ */
|
|
2359
|
+
children: steps.map((step, index) => /* @__PURE__ */ jsxs8("li", { className: "mt-1 first:mt-0", children: [
|
|
2360
|
+
/* @__PURE__ */ jsx9("span", { children: step.text }),
|
|
2361
|
+
step.copyable && /* @__PURE__ */ jsx9(
|
|
2213
2362
|
CopyableValue,
|
|
2214
2363
|
{
|
|
2215
2364
|
value: step.copyable,
|
|
@@ -2219,7 +2368,7 @@ function SetupGuidePanel({
|
|
|
2219
2368
|
] }, step.text))
|
|
2220
2369
|
}
|
|
2221
2370
|
),
|
|
2222
|
-
scopeNote && /* @__PURE__ */
|
|
2371
|
+
scopeNote && /* @__PURE__ */ jsx9(
|
|
2223
2372
|
"p",
|
|
2224
2373
|
{
|
|
2225
2374
|
"data-testid": `connector-guide-scope-note-${entry.slug}`,
|
|
@@ -2227,7 +2376,7 @@ function SetupGuidePanel({
|
|
|
2227
2376
|
children: scopeNote
|
|
2228
2377
|
}
|
|
2229
2378
|
),
|
|
2230
|
-
showVerify && verify && /* @__PURE__ */
|
|
2379
|
+
showVerify && verify && /* @__PURE__ */ jsx9(
|
|
2231
2380
|
"p",
|
|
2232
2381
|
{
|
|
2233
2382
|
"data-testid": `connector-guide-verify-${entry.slug}`,
|
|
@@ -2291,7 +2440,7 @@ function CredentialForm({
|
|
|
2291
2440
|
setBusy(false);
|
|
2292
2441
|
}
|
|
2293
2442
|
}, [kind, onSubmitCredentials, values]);
|
|
2294
|
-
return /* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ jsxs8(
|
|
2295
2444
|
"form",
|
|
2296
2445
|
{
|
|
2297
2446
|
"data-testid": `connector-credential-form-${entry.slug}`,
|
|
@@ -2305,12 +2454,12 @@ function CredentialForm({
|
|
|
2305
2454
|
fields.map((field) => {
|
|
2306
2455
|
const inputId = `connector-credential-${entry.slug}-${field.key}`;
|
|
2307
2456
|
const fieldError = fieldErrors?.[field.key] ?? null;
|
|
2308
|
-
return /* @__PURE__ */
|
|
2309
|
-
/* @__PURE__ */
|
|
2457
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1", children: [
|
|
2458
|
+
/* @__PURE__ */ jsxs8("label", { htmlFor: inputId, className: "text-xs font-medium", children: [
|
|
2310
2459
|
field.label,
|
|
2311
|
-
field.required !== false && /* @__PURE__ */
|
|
2460
|
+
field.required !== false && /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" })
|
|
2312
2461
|
] }),
|
|
2313
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ jsx9(
|
|
2314
2463
|
"input",
|
|
2315
2464
|
{
|
|
2316
2465
|
id: inputId,
|
|
@@ -2330,7 +2479,7 @@ function CredentialForm({
|
|
|
2330
2479
|
)
|
|
2331
2480
|
}
|
|
2332
2481
|
),
|
|
2333
|
-
fieldError && /* @__PURE__ */
|
|
2482
|
+
fieldError && /* @__PURE__ */ jsx9(
|
|
2334
2483
|
"p",
|
|
2335
2484
|
{
|
|
2336
2485
|
id: `${inputId}-error`,
|
|
@@ -2341,7 +2490,7 @@ function CredentialForm({
|
|
|
2341
2490
|
)
|
|
2342
2491
|
] }, field.key);
|
|
2343
2492
|
}),
|
|
2344
|
-
verify && /* @__PURE__ */
|
|
2493
|
+
verify && /* @__PURE__ */ jsx9(
|
|
2345
2494
|
"p",
|
|
2346
2495
|
{
|
|
2347
2496
|
"data-testid": `connector-guide-verify-${entry.slug}`,
|
|
@@ -2349,8 +2498,8 @@ function CredentialForm({
|
|
|
2349
2498
|
children: verify
|
|
2350
2499
|
}
|
|
2351
2500
|
),
|
|
2352
|
-
result && /* @__PURE__ */
|
|
2353
|
-
error && /* @__PURE__ */
|
|
2501
|
+
result && /* @__PURE__ */ jsx9(CredentialTestResult, { entry, result }),
|
|
2502
|
+
error && /* @__PURE__ */ jsx9(
|
|
2354
2503
|
"p",
|
|
2355
2504
|
{
|
|
2356
2505
|
role: "alert",
|
|
@@ -2359,8 +2508,8 @@ function CredentialForm({
|
|
|
2359
2508
|
children: error
|
|
2360
2509
|
}
|
|
2361
2510
|
),
|
|
2362
|
-
/* @__PURE__ */
|
|
2363
|
-
testSupported && /* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
2512
|
+
testSupported && /* @__PURE__ */ jsx9(
|
|
2364
2513
|
"button",
|
|
2365
2514
|
{
|
|
2366
2515
|
type: "button",
|
|
@@ -2371,7 +2520,7 @@ function CredentialForm({
|
|
|
2371
2520
|
children: testing ? "Testing\u2026" : "Test connection"
|
|
2372
2521
|
}
|
|
2373
2522
|
),
|
|
2374
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ jsx9(
|
|
2375
2524
|
"button",
|
|
2376
2525
|
{
|
|
2377
2526
|
type: "submit",
|
|
@@ -2392,15 +2541,15 @@ function CredentialTestResult({
|
|
|
2392
2541
|
result
|
|
2393
2542
|
}) {
|
|
2394
2543
|
if (result.valid === true) {
|
|
2395
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ jsxs8(
|
|
2396
2545
|
"div",
|
|
2397
2546
|
{
|
|
2398
2547
|
role: "status",
|
|
2399
2548
|
"data-testid": `connector-credential-test-pass-${entry.slug}`,
|
|
2400
2549
|
className: "rounded-md border border-primary/30 bg-primary/5 px-2 py-1 text-xs",
|
|
2401
2550
|
children: [
|
|
2402
|
-
/* @__PURE__ */
|
|
2403
|
-
result.permissions_note && /* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ jsx9("p", { children: result.account_name ? `Verified \u2014 connected as ${result.account_name}.` : "Verified \u2014 these credentials work." }),
|
|
2552
|
+
result.permissions_note && /* @__PURE__ */ jsx9(
|
|
2404
2553
|
"p",
|
|
2405
2554
|
{
|
|
2406
2555
|
"data-testid": `connector-credential-permissions-${entry.slug}`,
|
|
@@ -2413,7 +2562,7 @@ function CredentialTestResult({
|
|
|
2413
2562
|
);
|
|
2414
2563
|
}
|
|
2415
2564
|
if (result.valid === false) {
|
|
2416
|
-
return /* @__PURE__ */
|
|
2565
|
+
return /* @__PURE__ */ jsx9(
|
|
2417
2566
|
"p",
|
|
2418
2567
|
{
|
|
2419
2568
|
role: "alert",
|
|
@@ -2423,7 +2572,7 @@ function CredentialTestResult({
|
|
|
2423
2572
|
}
|
|
2424
2573
|
);
|
|
2425
2574
|
}
|
|
2426
|
-
return /* @__PURE__ */
|
|
2575
|
+
return /* @__PURE__ */ jsx9(
|
|
2427
2576
|
"p",
|
|
2428
2577
|
{
|
|
2429
2578
|
role: "status",
|
|
@@ -2486,13 +2635,13 @@ function ManageSharing({
|
|
|
2486
2635
|
},
|
|
2487
2636
|
[load, revokeGrant]
|
|
2488
2637
|
);
|
|
2489
|
-
return /* @__PURE__ */
|
|
2638
|
+
return /* @__PURE__ */ jsxs8(
|
|
2490
2639
|
"div",
|
|
2491
2640
|
{
|
|
2492
2641
|
"data-testid": `connector-sharing-panel-${entry.slug}`,
|
|
2493
2642
|
className: "mt-2 flex flex-col gap-2 rounded-md border border-border bg-foreground/5 p-2",
|
|
2494
2643
|
children: [
|
|
2495
|
-
grants === null && !error && /* @__PURE__ */
|
|
2644
|
+
grants === null && !error && /* @__PURE__ */ jsx9(
|
|
2496
2645
|
"p",
|
|
2497
2646
|
{
|
|
2498
2647
|
"data-testid": `connector-grants-loading-${entry.slug}`,
|
|
@@ -2500,7 +2649,7 @@ function ManageSharing({
|
|
|
2500
2649
|
children: "Loading sharing\u2026"
|
|
2501
2650
|
}
|
|
2502
2651
|
),
|
|
2503
|
-
error && /* @__PURE__ */
|
|
2652
|
+
error && /* @__PURE__ */ jsx9(
|
|
2504
2653
|
"p",
|
|
2505
2654
|
{
|
|
2506
2655
|
role: "alert",
|
|
@@ -2509,7 +2658,7 @@ function ManageSharing({
|
|
|
2509
2658
|
children: error
|
|
2510
2659
|
}
|
|
2511
2660
|
),
|
|
2512
|
-
grants !== null && grants.length === 0 && /* @__PURE__ */
|
|
2661
|
+
grants !== null && grants.length === 0 && /* @__PURE__ */ jsx9(
|
|
2513
2662
|
"p",
|
|
2514
2663
|
{
|
|
2515
2664
|
"data-testid": `connector-grants-empty-${entry.slug}`,
|
|
@@ -2517,21 +2666,21 @@ function ManageSharing({
|
|
|
2517
2666
|
children: "Not shared with anyone yet."
|
|
2518
2667
|
}
|
|
2519
2668
|
),
|
|
2520
|
-
grants?.map((grant) => /* @__PURE__ */
|
|
2669
|
+
grants?.map((grant) => /* @__PURE__ */ jsxs8(
|
|
2521
2670
|
"div",
|
|
2522
2671
|
{
|
|
2523
2672
|
"data-testid": `connector-grant-${entry.slug}-${grant.id}`,
|
|
2524
2673
|
className: "flex items-center justify-between gap-2 text-xs",
|
|
2525
2674
|
children: [
|
|
2526
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ jsxs8("span", { className: "truncate", children: [
|
|
2527
2676
|
grant.grantee_name || grant.grantee_id,
|
|
2528
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground", children: [
|
|
2529
2678
|
" ",
|
|
2530
2679
|
"\xB7 ",
|
|
2531
2680
|
grant.grantee_type === "role" ? "Role" : "User"
|
|
2532
2681
|
] })
|
|
2533
2682
|
] }),
|
|
2534
|
-
/* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ jsx9(
|
|
2535
2684
|
"button",
|
|
2536
2685
|
{
|
|
2537
2686
|
type: "button",
|
|
@@ -2546,8 +2695,8 @@ function ManageSharing({
|
|
|
2546
2695
|
},
|
|
2547
2696
|
grant.id
|
|
2548
2697
|
)),
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5", children: [
|
|
2699
|
+
/* @__PURE__ */ jsxs8(
|
|
2551
2700
|
"select",
|
|
2552
2701
|
{
|
|
2553
2702
|
"data-testid": `connector-grant-type-${entry.slug}`,
|
|
@@ -2560,12 +2709,12 @@ function ManageSharing({
|
|
|
2560
2709
|
disabled: busy,
|
|
2561
2710
|
className: "rounded-md border border-border bg-transparent px-1.5 py-1 text-xs disabled:opacity-50",
|
|
2562
2711
|
children: [
|
|
2563
|
-
/* @__PURE__ */
|
|
2564
|
-
/* @__PURE__ */
|
|
2712
|
+
/* @__PURE__ */ jsx9("option", { value: "user", children: "User" }),
|
|
2713
|
+
/* @__PURE__ */ jsx9("option", { value: "role", children: "Role" })
|
|
2565
2714
|
]
|
|
2566
2715
|
}
|
|
2567
2716
|
),
|
|
2568
|
-
granteeType === "user" ? /* @__PURE__ */
|
|
2717
|
+
granteeType === "user" ? /* @__PURE__ */ jsx9(
|
|
2569
2718
|
"input",
|
|
2570
2719
|
{
|
|
2571
2720
|
"data-testid": `connector-grant-grantee-${entry.slug}`,
|
|
@@ -2576,7 +2725,7 @@ function ManageSharing({
|
|
|
2576
2725
|
disabled: busy,
|
|
2577
2726
|
className: "min-w-0 flex-1 rounded-md border border-border bg-transparent px-1.5 py-1 text-xs disabled:opacity-50"
|
|
2578
2727
|
}
|
|
2579
|
-
) : /* @__PURE__ */
|
|
2728
|
+
) : /* @__PURE__ */ jsxs8(
|
|
2580
2729
|
"select",
|
|
2581
2730
|
{
|
|
2582
2731
|
"data-testid": `connector-grant-role-${entry.slug}`,
|
|
@@ -2586,12 +2735,12 @@ function ManageSharing({
|
|
|
2586
2735
|
disabled: busy,
|
|
2587
2736
|
className: "min-w-0 flex-1 rounded-md border border-border bg-transparent px-1.5 py-1 text-xs disabled:opacity-50",
|
|
2588
2737
|
children: [
|
|
2589
|
-
/* @__PURE__ */
|
|
2590
|
-
roleOptions.map((role) => /* @__PURE__ */
|
|
2738
|
+
/* @__PURE__ */ jsx9("option", { value: "", children: "Select a role\u2026" }),
|
|
2739
|
+
roleOptions.map((role) => /* @__PURE__ */ jsx9("option", { value: role.id, children: role.name }, role.id))
|
|
2591
2740
|
]
|
|
2592
2741
|
}
|
|
2593
2742
|
),
|
|
2594
|
-
/* @__PURE__ */
|
|
2743
|
+
/* @__PURE__ */ jsx9(
|
|
2595
2744
|
"button",
|
|
2596
2745
|
{
|
|
2597
2746
|
type: "button",
|
|
@@ -2612,6 +2761,7 @@ export {
|
|
|
2612
2761
|
BrandGlyph,
|
|
2613
2762
|
ConnectorPicker,
|
|
2614
2763
|
ContextSwitcher,
|
|
2764
|
+
DEFAULT_LEGAL_LINKS,
|
|
2615
2765
|
Flyout,
|
|
2616
2766
|
GLYPH_CANVAS_FILL,
|
|
2617
2767
|
HOVER_CLOSE_DELAY_MS,
|
|
@@ -2623,6 +2773,7 @@ export {
|
|
|
2623
2773
|
MARK_WEIGHT,
|
|
2624
2774
|
REEVE_ACCENT,
|
|
2625
2775
|
ResponsiveHeader,
|
|
2776
|
+
SiteFooter,
|
|
2626
2777
|
WORDMARK_WEIGHT,
|
|
2627
2778
|
accessLabel,
|
|
2628
2779
|
deriveFallbackLadder,
|