@fairmint/ui 0.2.25 → 0.2.26

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