@fairmint/ui 0.2.25 → 0.2.27

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.
@@ -36432,6 +36432,7 @@ const AVATAR_PALETTE = [
36432
36432
  colors.accent2,
36433
36433
  colors.accent3
36434
36434
  ];
36435
+ const overlayZIndexAboveLegacyShell = 1300;
36435
36436
  const radii = {
36436
36437
  xs: "0.25rem",
36437
36438
  sm: "0.375rem",
@@ -36725,8 +36726,8 @@ const Card = forwardRef((props, ref) => /* @__PURE__ */ jsx(Card$1, { padding: "
36725
36726
  Card.displayName = "Card";
36726
36727
  const Checkbox = forwardRef((props, ref) => /* @__PURE__ */ jsx(Checkbox$1, { color: colors.primary, ...props, ref }));
36727
36728
  Checkbox.displayName = "Checkbox";
36728
- function Drawer(props) {
36729
- return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
36729
+ function Drawer({ zIndex = overlayZIndexAboveLegacyShell, ...props }) {
36730
+ return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props, zIndex });
36730
36731
  }
36731
36732
  function Loader(props) {
36732
36733
  return /* @__PURE__ */ jsx(Loader$1, { ...props });
@@ -36741,8 +36742,8 @@ const Menu = Object.assign(MenuBase, {
36741
36742
  Label: Menu$1.Label,
36742
36743
  Divider: Menu$1.Divider
36743
36744
  });
36744
- function Modal(props) {
36745
- return /* @__PURE__ */ jsx(Modal$1, { centered: true, radius: "lg", ...props });
36745
+ function Modal({ zIndex = overlayZIndexAboveLegacyShell, ...props }) {
36746
+ return /* @__PURE__ */ jsx(Modal$1, { centered: true, radius: "lg", ...props, zIndex });
36746
36747
  }
36747
36748
  const PasswordInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(PasswordInput$1, { size: "md", ...props, ref }));
36748
36749
  PasswordInput.displayName = "PasswordInput";
@@ -38299,6 +38300,42 @@ function CompanyBanner({
38299
38300
  detailEl
38300
38301
  ] });
38301
38302
  }
38303
+ const DefaultLockIcon = () => /* @__PURE__ */ jsxs(
38304
+ "svg",
38305
+ {
38306
+ width: "12",
38307
+ height: "12",
38308
+ viewBox: "0 0 24 24",
38309
+ fill: "none",
38310
+ stroke: "currentColor",
38311
+ strokeWidth: "2",
38312
+ strokeLinecap: "round",
38313
+ strokeLinejoin: "round",
38314
+ "aria-hidden": "true",
38315
+ children: [
38316
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
38317
+ /* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
38318
+ ]
38319
+ }
38320
+ );
38321
+ function ConfidentialityBanner({ children, icon }) {
38322
+ const iconNode = icon === void 0 ? /* @__PURE__ */ jsx(DefaultLockIcon, {}) : icon;
38323
+ return /* @__PURE__ */ jsx(
38324
+ Box,
38325
+ {
38326
+ py: 8,
38327
+ px: "md",
38328
+ style: {
38329
+ background: `linear-gradient(90deg, ${brandColors.indigo}14 0%, ${brandColors.purple}14 100%)`,
38330
+ borderBottom: `1px solid ${neutralColors[200]}`
38331
+ },
38332
+ children: /* @__PURE__ */ jsxs(Group, { justify: "center", gap: 6, wrap: "nowrap", children: [
38333
+ iconNode !== null && /* @__PURE__ */ jsx(Box, { c: neutralColors[600], style: { display: "inline-flex" }, children: iconNode }),
38334
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: neutralColors[700], fw: 500, ta: "center", children })
38335
+ ] })
38336
+ }
38337
+ );
38338
+ }
38302
38339
  function ConfirmDialog({
38303
38340
  title,
38304
38341
  message,
@@ -38464,6 +38501,40 @@ function Currency({ value, precise = false, currency, style, ...rest }) {
38464
38501
  }
38465
38502
  return /* @__PURE__ */ jsx(Text, { component: "span", style: [TABULAR_NUMS, style], ...rest, children: formatted });
38466
38503
  }
38504
+ function DataRow({ label, value, accent = false }) {
38505
+ return /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "nowrap", children: [
38506
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: neutralColors[600], style: { flexShrink: 0 }, children: label }),
38507
+ value === null ? /* @__PURE__ */ jsx(RedactedValue, {}) : typeof value === "string" ? /* @__PURE__ */ jsx(
38508
+ Text,
38509
+ {
38510
+ size: "sm",
38511
+ fw: accent ? 700 : 500,
38512
+ c: accent ? `${colors.success}.8` : neutralColors[900],
38513
+ ta: "right",
38514
+ style: { minWidth: 0 },
38515
+ children: value
38516
+ }
38517
+ ) : value
38518
+ ] });
38519
+ }
38520
+ function StackedValue({ values: values2 }) {
38521
+ return /* @__PURE__ */ jsx(Stack, { gap: 2, align: "flex-end", children: values2.map((v) => /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, c: neutralColors[800], ta: "right", children: v }, v)) });
38522
+ }
38523
+ function RedactedValue({ width = 80 } = {}) {
38524
+ return /* @__PURE__ */ jsx(
38525
+ Box,
38526
+ {
38527
+ role: "img",
38528
+ "aria-label": "Redacted — sign in to view",
38529
+ style: {
38530
+ height: 14,
38531
+ width,
38532
+ borderRadius: 4,
38533
+ background: `repeating-linear-gradient(135deg, ${neutralColors[200]} 0 4px, ${neutralColors[100]} 4px 8px)`
38534
+ }
38535
+ }
38536
+ );
38537
+ }
38467
38538
  function EmptyState({
38468
38539
  icon,
38469
38540
  title,
@@ -38749,7 +38820,10 @@ function ErrorPage({
38749
38820
  }
38750
38821
  );
38751
38822
  }
38752
- const DefaultChevronIcon = () => /* @__PURE__ */ jsx(
38823
+ function Eyebrow({ children, size: size2 = "xs", c = neutralColors[500], ...rest }) {
38824
+ return /* @__PURE__ */ jsx(Text, { size: size2, fw: 700, tt: "uppercase", c, style: { letterSpacing: "0.08em" }, ...rest, children });
38825
+ }
38826
+ const DefaultChevronIcon$1 = () => /* @__PURE__ */ jsx(
38753
38827
  "svg",
38754
38828
  {
38755
38829
  width: "14",
@@ -38814,7 +38888,7 @@ function ListRow({
38814
38888
  }
38815
38889
  )
38816
38890
  ] })),
38817
- displayChevron && (chevronIcon ?? /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextTertiary, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx(DefaultChevronIcon, {}) }))
38891
+ displayChevron && (chevronIcon ?? /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextTertiary, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx(DefaultChevronIcon$1, {}) }))
38818
38892
  ] })
38819
38893
  ] });
38820
38894
  const animationStyle = animate ? {
@@ -40103,6 +40177,80 @@ function PhotoCropModal({
40103
40177
  ] })
40104
40178
  ] }) });
40105
40179
  }
40180
+ function RadioCard({
40181
+ selected,
40182
+ title,
40183
+ description,
40184
+ badge,
40185
+ leading,
40186
+ onSelect
40187
+ }) {
40188
+ return /* @__PURE__ */ jsx(
40189
+ UnstyledButton,
40190
+ {
40191
+ onClick: onSelect,
40192
+ role: "radio",
40193
+ "aria-checked": selected,
40194
+ style: {
40195
+ display: "block",
40196
+ width: "100%",
40197
+ padding: 16,
40198
+ borderRadius: 12,
40199
+ border: `1.5px solid ${selected ? brandColors.indigo : neutralColors[200]}`,
40200
+ background: selected ? `${brandColors.indigo}08` : "white",
40201
+ transition: "all 120ms ease",
40202
+ textAlign: "left"
40203
+ },
40204
+ children: /* @__PURE__ */ jsxs(Box, { style: { display: "flex", gap: 12, alignItems: "flex-start" }, children: [
40205
+ leading && /* @__PURE__ */ jsx(Box, { style: { flexShrink: 0 }, children: leading }),
40206
+ /* @__PURE__ */ jsxs(Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
40207
+ /* @__PURE__ */ jsxs(
40208
+ Box,
40209
+ {
40210
+ style: {
40211
+ display: "flex",
40212
+ justifyContent: "space-between",
40213
+ alignItems: "baseline",
40214
+ gap: 8
40215
+ },
40216
+ children: [
40217
+ /* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", c: neutralColors[900], children: title }),
40218
+ badge
40219
+ ]
40220
+ }
40221
+ ),
40222
+ description && /* @__PURE__ */ jsx(Text, { size: "xs", c: neutralColors[600], lh: 1.5, children: description })
40223
+ ] }),
40224
+ /* @__PURE__ */ jsx(
40225
+ Box,
40226
+ {
40227
+ style: {
40228
+ width: 18,
40229
+ height: 18,
40230
+ borderRadius: "50%",
40231
+ border: `2px solid ${selected ? brandColors.indigo : neutralColors[300]}`,
40232
+ background: selected ? brandColors.indigo : "transparent",
40233
+ position: "relative",
40234
+ flexShrink: 0,
40235
+ marginTop: 2
40236
+ },
40237
+ children: selected && /* @__PURE__ */ jsx(
40238
+ Box,
40239
+ {
40240
+ style: {
40241
+ position: "absolute",
40242
+ inset: 4,
40243
+ borderRadius: "50%",
40244
+ background: "white"
40245
+ }
40246
+ }
40247
+ )
40248
+ }
40249
+ )
40250
+ ] })
40251
+ }
40252
+ );
40253
+ }
40106
40254
  function SearchInput({
40107
40255
  value,
40108
40256
  onChange,
@@ -40222,6 +40370,68 @@ function StatusBadge({ status, colorMap, label, ...rest }) {
40222
40370
  const displayLabel = label ?? status.charAt(0).toUpperCase() + status.slice(1);
40223
40371
  return /* @__PURE__ */ jsx(Badge, { color, variant: "light", ...rest, children: displayLabel });
40224
40372
  }
40373
+ const DefaultCheckIcon = () => /* @__PURE__ */ jsxs(
40374
+ "svg",
40375
+ {
40376
+ width: "18",
40377
+ height: "18",
40378
+ viewBox: "0 0 24 24",
40379
+ fill: "none",
40380
+ stroke: "currentColor",
40381
+ strokeWidth: "2",
40382
+ strokeLinecap: "round",
40383
+ strokeLinejoin: "round",
40384
+ "aria-hidden": "true",
40385
+ children: [
40386
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
40387
+ /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
40388
+ ]
40389
+ }
40390
+ );
40391
+ function StepCard({
40392
+ index: index2,
40393
+ title,
40394
+ description,
40395
+ done = false,
40396
+ doneIcon,
40397
+ children
40398
+ }) {
40399
+ return /* @__PURE__ */ jsx(
40400
+ Paper,
40401
+ {
40402
+ radius: "lg",
40403
+ p: { base: "md", sm: "xl" },
40404
+ style: {
40405
+ background: "white",
40406
+ border: `1px solid ${neutralColors[200]}`
40407
+ },
40408
+ children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
40409
+ /* @__PURE__ */ jsxs(Group, { gap: "md", align: "flex-start", wrap: "nowrap", children: [
40410
+ /* @__PURE__ */ jsx(
40411
+ ThemeIcon,
40412
+ {
40413
+ size: 32,
40414
+ radius: "xl",
40415
+ variant: done ? "filled" : "light",
40416
+ color: done ? "indigo" : "gray",
40417
+ style: {
40418
+ flexShrink: 0,
40419
+ background: done ? brandColors.indigo : neutralColors[100],
40420
+ color: done ? "white" : neutralColors[600]
40421
+ },
40422
+ children: done ? doneIcon ?? /* @__PURE__ */ jsx(DefaultCheckIcon, {}) : /* @__PURE__ */ jsx(Text, { fw: 700, fz: 14, children: index2 })
40423
+ }
40424
+ ),
40425
+ /* @__PURE__ */ jsxs(Box, { style: { minWidth: 0, flex: 1 }, children: [
40426
+ /* @__PURE__ */ jsx(Text, { fw: 700, fz: { base: 17, sm: 19 }, c: neutralColors[900], lh: 1.3, children: title }),
40427
+ description && /* @__PURE__ */ jsx(Text, { size: "sm", c: neutralColors[600], lh: 1.5, mt: 4, children: description })
40428
+ ] })
40429
+ ] }),
40430
+ /* @__PURE__ */ jsx(Box, { pl: { base: 0, sm: 48 }, children })
40431
+ ] })
40432
+ }
40433
+ );
40434
+ }
40225
40435
  function LoadingSpinner({ size: size2 = 32 }) {
40226
40436
  const iconProps = {
40227
40437
  xmlns: "http://www.w3.org/2000/svg",
@@ -40351,26 +40561,88 @@ function UserMenu({
40351
40561
  ] }, item.id)) })
40352
40562
  ] });
40353
40563
  }
40564
+ const DefaultDocumentIcon = () => /* @__PURE__ */ jsxs(
40565
+ "svg",
40566
+ {
40567
+ width: "18",
40568
+ height: "18",
40569
+ viewBox: "0 0 24 24",
40570
+ fill: "none",
40571
+ stroke: "currentColor",
40572
+ strokeWidth: "2",
40573
+ strokeLinecap: "round",
40574
+ strokeLinejoin: "round",
40575
+ "aria-hidden": "true",
40576
+ children: [
40577
+ /* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
40578
+ /* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" }),
40579
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
40580
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
40581
+ /* @__PURE__ */ jsx("polyline", { points: "10 9 9 9 8 9" })
40582
+ ]
40583
+ }
40584
+ );
40585
+ const DefaultChevronIcon = () => /* @__PURE__ */ jsx(
40586
+ "svg",
40587
+ {
40588
+ width: "14",
40589
+ height: "14",
40590
+ viewBox: "0 0 24 24",
40591
+ fill: "none",
40592
+ stroke: "currentColor",
40593
+ strokeWidth: "2",
40594
+ strokeLinecap: "round",
40595
+ strokeLinejoin: "round",
40596
+ "aria-hidden": "true",
40597
+ children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
40598
+ }
40599
+ );
40354
40600
  function DocumentRow({
40355
40601
  name,
40602
+ caption,
40356
40603
  type,
40357
40604
  date: date2,
40605
+ icon,
40358
40606
  rightSection,
40359
40607
  onClick,
40360
- animationDelay
40608
+ showChevron = false,
40609
+ animationDelay,
40610
+ ariaLabel
40361
40611
  }) {
40362
- const subtitle = [type, date2 ? formatDate(date2) : void 0].filter(Boolean).join(" · ");
40612
+ const isClickable = Boolean(onClick);
40613
+ const animate = animationDelay !== void 0;
40614
+ const resolvedCaption = caption ?? (type || date2 ? [type, date2 ? formatDate(date2) : void 0].filter(Boolean).join(" · ") : void 0);
40615
+ const leadingNode = icon ?? /* @__PURE__ */ jsx(ThemeIcon, { size: 36, radius: "md", variant: "light", color: colors.primary, children: /* @__PURE__ */ jsx(DefaultDocumentIcon, {}) });
40616
+ const content = /* @__PURE__ */ jsxs(Group, { gap: "md", wrap: "nowrap", align: "center", children: [
40617
+ /* @__PURE__ */ jsx(Box, { style: { flexShrink: 0 }, children: leadingNode }),
40618
+ /* @__PURE__ */ jsxs(Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
40619
+ /* @__PURE__ */ jsx(Text, { fw: 500, size: "sm", lineClamp: 1, children: name }),
40620
+ resolvedCaption !== void 0 && resolvedCaption !== null && resolvedCaption !== "" ? typeof resolvedCaption === "string" ? /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, lineClamp: 1, children: resolvedCaption }) : resolvedCaption : null
40621
+ ] }),
40622
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", style: { flexShrink: 0 }, children: [
40623
+ rightSection,
40624
+ showChevron && /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextTertiary, style: { display: "inline-flex" }, children: /* @__PURE__ */ jsx(DefaultChevronIcon, {}) })
40625
+ ] })
40626
+ ] });
40627
+ const animationStyle = animate ? {
40628
+ opacity: 0,
40629
+ animation: "rowSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards",
40630
+ animationDelay: `${animationDelay}s`
40631
+ } : void 0;
40632
+ if (!isClickable) {
40633
+ return /* @__PURE__ */ jsx(Box, { py: "sm", px: "md", style: animationStyle, children: content });
40634
+ }
40363
40635
  return /* @__PURE__ */ jsx(
40364
- ListRow,
40636
+ UnstyledButton,
40365
40637
  {
40366
- title: name,
40367
- subtitle: subtitle || void 0,
40368
- avatarName: name,
40369
- avatarColor: colors.neutral,
40370
- rightSection,
40371
40638
  onClick,
40372
- animationDelay,
40373
- showChevron: Boolean(onClick)
40639
+ className: "fairmint-list-row",
40640
+ w: "100%",
40641
+ py: "sm",
40642
+ px: "md",
40643
+ style: animationStyle,
40644
+ "aria-label": ariaLabel ?? name,
40645
+ children: content
40374
40646
  }
40375
40647
  );
40376
40648
  }
@@ -41167,9 +41439,11 @@ export {
41167
41439
  Collapse,
41168
41440
  ColorDot,
41169
41441
  CompanyBanner,
41442
+ ConfidentialityBanner,
41170
41443
  ConfirmDialog,
41171
41444
  Container,
41172
41445
  Currency,
41446
+ DataRow,
41173
41447
  DataTable,
41174
41448
  DateDisplay,
41175
41449
  DetailDrawer,
@@ -41184,6 +41458,7 @@ export {
41184
41458
  ErrorFallback,
41185
41459
  ErrorPage,
41186
41460
  EthereumAddressField,
41461
+ Eyebrow,
41187
41462
  FairmintLogo,
41188
41463
  FairmintProvider,
41189
41464
  Flex,
@@ -41213,6 +41488,8 @@ export {
41213
41488
  PhotoCropModal,
41214
41489
  PinInput,
41215
41490
  Progress,
41491
+ RadioCard,
41492
+ RedactedValue,
41216
41493
  ScrollArea,
41217
41494
  SearchInput,
41218
41495
  SegmentedControl,
@@ -41222,8 +41499,10 @@ export {
41222
41499
  Skeleton,
41223
41500
  Space,
41224
41501
  Stack,
41502
+ StackedValue,
41225
41503
  StatCard,
41226
41504
  StatusBadge,
41505
+ StepCard,
41227
41506
  Switch,
41228
41507
  TABLET_BREAKPOINT,
41229
41508
  Table,