@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.
@@ -36450,6 +36450,7 @@ const AVATAR_PALETTE = [
36450
36450
  colors.accent2,
36451
36451
  colors.accent3
36452
36452
  ];
36453
+ const overlayZIndexAboveLegacyShell = 1300;
36453
36454
  const radii = {
36454
36455
  xs: "0.25rem",
36455
36456
  sm: "0.375rem",
@@ -36743,8 +36744,8 @@ const Card = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Car
36743
36744
  Card.displayName = "Card";
36744
36745
  const Checkbox = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Checkbox$1, { color: colors.primary, ...props, ref }));
36745
36746
  Checkbox.displayName = "Checkbox";
36746
- function Drawer(props) {
36747
- return /* @__PURE__ */ jsxRuntime.jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
36747
+ function Drawer({ zIndex = overlayZIndexAboveLegacyShell, ...props }) {
36748
+ return /* @__PURE__ */ jsxRuntime.jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props, zIndex });
36748
36749
  }
36749
36750
  function Loader(props) {
36750
36751
  return /* @__PURE__ */ jsxRuntime.jsx(Loader$1, { ...props });
@@ -36759,8 +36760,8 @@ const Menu = Object.assign(MenuBase, {
36759
36760
  Label: Menu$1.Label,
36760
36761
  Divider: Menu$1.Divider
36761
36762
  });
36762
- function Modal(props) {
36763
- return /* @__PURE__ */ jsxRuntime.jsx(Modal$1, { centered: true, radius: "lg", ...props });
36763
+ function Modal({ zIndex = overlayZIndexAboveLegacyShell, ...props }) {
36764
+ return /* @__PURE__ */ jsxRuntime.jsx(Modal$1, { centered: true, radius: "lg", ...props, zIndex });
36764
36765
  }
36765
36766
  const PasswordInput = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(PasswordInput$1, { size: "md", ...props, ref }));
36766
36767
  PasswordInput.displayName = "PasswordInput";
@@ -38317,6 +38318,42 @@ function CompanyBanner({
38317
38318
  detailEl
38318
38319
  ] });
38319
38320
  }
38321
+ const DefaultLockIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
38322
+ "svg",
38323
+ {
38324
+ width: "12",
38325
+ height: "12",
38326
+ viewBox: "0 0 24 24",
38327
+ fill: "none",
38328
+ stroke: "currentColor",
38329
+ strokeWidth: "2",
38330
+ strokeLinecap: "round",
38331
+ strokeLinejoin: "round",
38332
+ "aria-hidden": "true",
38333
+ children: [
38334
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
38335
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
38336
+ ]
38337
+ }
38338
+ );
38339
+ function ConfidentialityBanner({ children, icon }) {
38340
+ const iconNode = icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(DefaultLockIcon, {}) : icon;
38341
+ return /* @__PURE__ */ jsxRuntime.jsx(
38342
+ Box,
38343
+ {
38344
+ py: 8,
38345
+ px: "md",
38346
+ style: {
38347
+ background: `linear-gradient(90deg, ${brandColors.indigo}14 0%, ${brandColors.purple}14 100%)`,
38348
+ borderBottom: `1px solid ${neutralColors[200]}`
38349
+ },
38350
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Group, { justify: "center", gap: 6, wrap: "nowrap", children: [
38351
+ iconNode !== null && /* @__PURE__ */ jsxRuntime.jsx(Box, { c: neutralColors[600], style: { display: "inline-flex" }, children: iconNode }),
38352
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", c: neutralColors[700], fw: 500, ta: "center", children })
38353
+ ] })
38354
+ }
38355
+ );
38356
+ }
38320
38357
  function ConfirmDialog({
38321
38358
  title,
38322
38359
  message,
@@ -38482,6 +38519,40 @@ function Currency({ value, precise = false, currency, style, ...rest }) {
38482
38519
  }
38483
38520
  return /* @__PURE__ */ jsxRuntime.jsx(Text, { component: "span", style: [TABULAR_NUMS, style], ...rest, children: formatted });
38484
38521
  }
38522
+ function DataRow({ label, value, accent = false }) {
38523
+ return /* @__PURE__ */ jsxRuntime.jsxs(Group, { justify: "space-between", align: "flex-start", gap: "md", wrap: "nowrap", children: [
38524
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", c: neutralColors[600], style: { flexShrink: 0 }, children: label }),
38525
+ value === null ? /* @__PURE__ */ jsxRuntime.jsx(RedactedValue, {}) : typeof value === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
38526
+ Text,
38527
+ {
38528
+ size: "sm",
38529
+ fw: accent ? 700 : 500,
38530
+ c: accent ? `${colors.success}.8` : neutralColors[900],
38531
+ ta: "right",
38532
+ style: { minWidth: 0 },
38533
+ children: value
38534
+ }
38535
+ ) : value
38536
+ ] });
38537
+ }
38538
+ function StackedValue({ values: values2 }) {
38539
+ return /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: 2, align: "flex-end", children: values2.map((v) => /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", fw: 500, c: neutralColors[800], ta: "right", children: v }, v)) });
38540
+ }
38541
+ function RedactedValue({ width = 80 } = {}) {
38542
+ return /* @__PURE__ */ jsxRuntime.jsx(
38543
+ Box,
38544
+ {
38545
+ role: "img",
38546
+ "aria-label": "Redacted — sign in to view",
38547
+ style: {
38548
+ height: 14,
38549
+ width,
38550
+ borderRadius: 4,
38551
+ background: `repeating-linear-gradient(135deg, ${neutralColors[200]} 0 4px, ${neutralColors[100]} 4px 8px)`
38552
+ }
38553
+ }
38554
+ );
38555
+ }
38485
38556
  function EmptyState({
38486
38557
  icon,
38487
38558
  title,
@@ -38767,7 +38838,10 @@ function ErrorPage({
38767
38838
  }
38768
38839
  );
38769
38840
  }
38770
- const DefaultChevronIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
38841
+ function Eyebrow({ children, size: size2 = "xs", c = neutralColors[500], ...rest }) {
38842
+ return /* @__PURE__ */ jsxRuntime.jsx(Text, { size: size2, fw: 700, tt: "uppercase", c, style: { letterSpacing: "0.08em" }, ...rest, children });
38843
+ }
38844
+ const DefaultChevronIcon$1 = () => /* @__PURE__ */ jsxRuntime.jsx(
38771
38845
  "svg",
38772
38846
  {
38773
38847
  width: "14",
@@ -38832,7 +38906,7 @@ function ListRow({
38832
38906
  }
38833
38907
  )
38834
38908
  ] })),
38835
- displayChevron && (chevronIcon ?? /* @__PURE__ */ jsxRuntime.jsx(Box, { c: fairmintVars.colorTextTertiary, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultChevronIcon, {}) }))
38909
+ displayChevron && (chevronIcon ?? /* @__PURE__ */ jsxRuntime.jsx(Box, { c: fairmintVars.colorTextTertiary, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultChevronIcon$1, {}) }))
38836
38910
  ] })
38837
38911
  ] });
38838
38912
  const animationStyle = animate ? {
@@ -40121,6 +40195,80 @@ function PhotoCropModal({
40121
40195
  ] })
40122
40196
  ] }) });
40123
40197
  }
40198
+ function RadioCard({
40199
+ selected,
40200
+ title,
40201
+ description,
40202
+ badge,
40203
+ leading,
40204
+ onSelect
40205
+ }) {
40206
+ return /* @__PURE__ */ jsxRuntime.jsx(
40207
+ UnstyledButton,
40208
+ {
40209
+ onClick: onSelect,
40210
+ role: "radio",
40211
+ "aria-checked": selected,
40212
+ style: {
40213
+ display: "block",
40214
+ width: "100%",
40215
+ padding: 16,
40216
+ borderRadius: 12,
40217
+ border: `1.5px solid ${selected ? brandColors.indigo : neutralColors[200]}`,
40218
+ background: selected ? `${brandColors.indigo}08` : "white",
40219
+ transition: "all 120ms ease",
40220
+ textAlign: "left"
40221
+ },
40222
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { style: { display: "flex", gap: 12, alignItems: "flex-start" }, children: [
40223
+ leading && /* @__PURE__ */ jsxRuntime.jsx(Box, { style: { flexShrink: 0 }, children: leading }),
40224
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
40225
+ /* @__PURE__ */ jsxRuntime.jsxs(
40226
+ Box,
40227
+ {
40228
+ style: {
40229
+ display: "flex",
40230
+ justifyContent: "space-between",
40231
+ alignItems: "baseline",
40232
+ gap: 8
40233
+ },
40234
+ children: [
40235
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { fw: 600, size: "sm", c: neutralColors[900], children: title }),
40236
+ badge
40237
+ ]
40238
+ }
40239
+ ),
40240
+ description && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", c: neutralColors[600], lh: 1.5, children: description })
40241
+ ] }),
40242
+ /* @__PURE__ */ jsxRuntime.jsx(
40243
+ Box,
40244
+ {
40245
+ style: {
40246
+ width: 18,
40247
+ height: 18,
40248
+ borderRadius: "50%",
40249
+ border: `2px solid ${selected ? brandColors.indigo : neutralColors[300]}`,
40250
+ background: selected ? brandColors.indigo : "transparent",
40251
+ position: "relative",
40252
+ flexShrink: 0,
40253
+ marginTop: 2
40254
+ },
40255
+ children: selected && /* @__PURE__ */ jsxRuntime.jsx(
40256
+ Box,
40257
+ {
40258
+ style: {
40259
+ position: "absolute",
40260
+ inset: 4,
40261
+ borderRadius: "50%",
40262
+ background: "white"
40263
+ }
40264
+ }
40265
+ )
40266
+ }
40267
+ )
40268
+ ] })
40269
+ }
40270
+ );
40271
+ }
40124
40272
  function SearchInput({
40125
40273
  value,
40126
40274
  onChange,
@@ -40240,6 +40388,68 @@ function StatusBadge({ status, colorMap, label, ...rest }) {
40240
40388
  const displayLabel = label ?? status.charAt(0).toUpperCase() + status.slice(1);
40241
40389
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, { color, variant: "light", ...rest, children: displayLabel });
40242
40390
  }
40391
+ const DefaultCheckIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
40392
+ "svg",
40393
+ {
40394
+ width: "18",
40395
+ height: "18",
40396
+ viewBox: "0 0 24 24",
40397
+ fill: "none",
40398
+ stroke: "currentColor",
40399
+ strokeWidth: "2",
40400
+ strokeLinecap: "round",
40401
+ strokeLinejoin: "round",
40402
+ "aria-hidden": "true",
40403
+ children: [
40404
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
40405
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 12 2 2 4-4" })
40406
+ ]
40407
+ }
40408
+ );
40409
+ function StepCard({
40410
+ index: index2,
40411
+ title,
40412
+ description,
40413
+ done = false,
40414
+ doneIcon,
40415
+ children
40416
+ }) {
40417
+ return /* @__PURE__ */ jsxRuntime.jsx(
40418
+ Paper,
40419
+ {
40420
+ radius: "lg",
40421
+ p: { base: "md", sm: "xl" },
40422
+ style: {
40423
+ background: "white",
40424
+ border: `1px solid ${neutralColors[200]}`
40425
+ },
40426
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: "md", children: [
40427
+ /* @__PURE__ */ jsxRuntime.jsxs(Group, { gap: "md", align: "flex-start", wrap: "nowrap", children: [
40428
+ /* @__PURE__ */ jsxRuntime.jsx(
40429
+ ThemeIcon,
40430
+ {
40431
+ size: 32,
40432
+ radius: "xl",
40433
+ variant: done ? "filled" : "light",
40434
+ color: done ? "indigo" : "gray",
40435
+ style: {
40436
+ flexShrink: 0,
40437
+ background: done ? brandColors.indigo : neutralColors[100],
40438
+ color: done ? "white" : neutralColors[600]
40439
+ },
40440
+ children: done ? doneIcon ?? /* @__PURE__ */ jsxRuntime.jsx(DefaultCheckIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(Text, { fw: 700, fz: 14, children: index2 })
40441
+ }
40442
+ ),
40443
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { style: { minWidth: 0, flex: 1 }, children: [
40444
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { fw: 700, fz: { base: 17, sm: 19 }, c: neutralColors[900], lh: 1.3, children: title }),
40445
+ description && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", c: neutralColors[600], lh: 1.5, mt: 4, children: description })
40446
+ ] })
40447
+ ] }),
40448
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { pl: { base: 0, sm: 48 }, children })
40449
+ ] })
40450
+ }
40451
+ );
40452
+ }
40243
40453
  function LoadingSpinner({ size: size2 = 32 }) {
40244
40454
  const iconProps = {
40245
40455
  xmlns: "http://www.w3.org/2000/svg",
@@ -40369,26 +40579,88 @@ function UserMenu({
40369
40579
  ] }, item.id)) })
40370
40580
  ] });
40371
40581
  }
40582
+ const DefaultDocumentIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
40583
+ "svg",
40584
+ {
40585
+ width: "18",
40586
+ height: "18",
40587
+ viewBox: "0 0 24 24",
40588
+ fill: "none",
40589
+ stroke: "currentColor",
40590
+ strokeWidth: "2",
40591
+ strokeLinecap: "round",
40592
+ strokeLinejoin: "round",
40593
+ "aria-hidden": "true",
40594
+ children: [
40595
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
40596
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "14 2 14 8 20 8" }),
40597
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
40598
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
40599
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "10 9 9 9 8 9" })
40600
+ ]
40601
+ }
40602
+ );
40603
+ const DefaultChevronIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
40604
+ "svg",
40605
+ {
40606
+ width: "14",
40607
+ height: "14",
40608
+ viewBox: "0 0 24 24",
40609
+ fill: "none",
40610
+ stroke: "currentColor",
40611
+ strokeWidth: "2",
40612
+ strokeLinecap: "round",
40613
+ strokeLinejoin: "round",
40614
+ "aria-hidden": "true",
40615
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
40616
+ }
40617
+ );
40372
40618
  function DocumentRow({
40373
40619
  name,
40620
+ caption,
40374
40621
  type,
40375
40622
  date: date2,
40623
+ icon,
40376
40624
  rightSection,
40377
40625
  onClick,
40378
- animationDelay
40626
+ showChevron = false,
40627
+ animationDelay,
40628
+ ariaLabel
40379
40629
  }) {
40380
- const subtitle = [type, date2 ? formatDate(date2) : void 0].filter(Boolean).join(" · ");
40630
+ const isClickable = Boolean(onClick);
40631
+ const animate = animationDelay !== void 0;
40632
+ const resolvedCaption = caption ?? (type || date2 ? [type, date2 ? formatDate(date2) : void 0].filter(Boolean).join(" · ") : void 0);
40633
+ const leadingNode = icon ?? /* @__PURE__ */ jsxRuntime.jsx(ThemeIcon, { size: 36, radius: "md", variant: "light", color: colors.primary, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultDocumentIcon, {}) });
40634
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(Group, { gap: "md", wrap: "nowrap", align: "center", children: [
40635
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { style: { flexShrink: 0 }, children: leadingNode }),
40636
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
40637
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { fw: 500, size: "sm", lineClamp: 1, children: name }),
40638
+ resolvedCaption !== void 0 && resolvedCaption !== null && resolvedCaption !== "" ? typeof resolvedCaption === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, lineClamp: 1, children: resolvedCaption }) : resolvedCaption : null
40639
+ ] }),
40640
+ /* @__PURE__ */ jsxRuntime.jsxs(Group, { gap: "xs", wrap: "nowrap", style: { flexShrink: 0 }, children: [
40641
+ rightSection,
40642
+ showChevron && /* @__PURE__ */ jsxRuntime.jsx(Box, { c: fairmintVars.colorTextTertiary, style: { display: "inline-flex" }, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultChevronIcon, {}) })
40643
+ ] })
40644
+ ] });
40645
+ const animationStyle = animate ? {
40646
+ opacity: 0,
40647
+ animation: "rowSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards",
40648
+ animationDelay: `${animationDelay}s`
40649
+ } : void 0;
40650
+ if (!isClickable) {
40651
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { py: "sm", px: "md", style: animationStyle, children: content });
40652
+ }
40381
40653
  return /* @__PURE__ */ jsxRuntime.jsx(
40382
- ListRow,
40654
+ UnstyledButton,
40383
40655
  {
40384
- title: name,
40385
- subtitle: subtitle || void 0,
40386
- avatarName: name,
40387
- avatarColor: colors.neutral,
40388
- rightSection,
40389
40656
  onClick,
40390
- animationDelay,
40391
- showChevron: Boolean(onClick)
40657
+ className: "fairmint-list-row",
40658
+ w: "100%",
40659
+ py: "sm",
40660
+ px: "md",
40661
+ style: animationStyle,
40662
+ "aria-label": ariaLabel ?? name,
40663
+ children: content
40392
40664
  }
40393
40665
  );
40394
40666
  }
@@ -41184,9 +41456,11 @@ exports.ClickableCard = ClickableCard;
41184
41456
  exports.Collapse = Collapse;
41185
41457
  exports.ColorDot = ColorDot;
41186
41458
  exports.CompanyBanner = CompanyBanner;
41459
+ exports.ConfidentialityBanner = ConfidentialityBanner;
41187
41460
  exports.ConfirmDialog = ConfirmDialog;
41188
41461
  exports.Container = Container;
41189
41462
  exports.Currency = Currency;
41463
+ exports.DataRow = DataRow;
41190
41464
  exports.DataTable = DataTable;
41191
41465
  exports.DateDisplay = DateDisplay;
41192
41466
  exports.DetailDrawer = DetailDrawer;
@@ -41201,6 +41475,7 @@ exports.EquityGrantCard = EquityGrantCard;
41201
41475
  exports.ErrorFallback = ErrorFallback;
41202
41476
  exports.ErrorPage = ErrorPage;
41203
41477
  exports.EthereumAddressField = EthereumAddressField;
41478
+ exports.Eyebrow = Eyebrow;
41204
41479
  exports.FairmintLogo = FairmintLogo;
41205
41480
  exports.FairmintProvider = FairmintProvider;
41206
41481
  exports.Flex = Flex;
@@ -41230,6 +41505,8 @@ exports.PhoneField = PhoneField;
41230
41505
  exports.PhotoCropModal = PhotoCropModal;
41231
41506
  exports.PinInput = PinInput;
41232
41507
  exports.Progress = Progress;
41508
+ exports.RadioCard = RadioCard;
41509
+ exports.RedactedValue = RedactedValue;
41233
41510
  exports.ScrollArea = ScrollArea;
41234
41511
  exports.SearchInput = SearchInput;
41235
41512
  exports.SegmentedControl = SegmentedControl;
@@ -41239,8 +41516,10 @@ exports.SimpleGrid = SimpleGrid;
41239
41516
  exports.Skeleton = Skeleton;
41240
41517
  exports.Space = Space;
41241
41518
  exports.Stack = Stack;
41519
+ exports.StackedValue = StackedValue;
41242
41520
  exports.StatCard = StatCard;
41243
41521
  exports.StatusBadge = StatusBadge;
41522
+ exports.StepCard = StepCard;
41244
41523
  exports.Switch = Switch;
41245
41524
  exports.TABLET_BREAKPOINT = TABLET_BREAKPOINT;
41246
41525
  exports.Table = Table;