@designa8/vibedesign-stripe-deepseek-2-176b 0.2.2 → 0.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-stripe-deepseek-2-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.2.2**.
3
+ Complete design system generated by Atoms Design, version **0.2.4**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -7274,15 +7274,30 @@ var React35 = __toESM(require("react"));
7274
7274
  var import_jsx_runtime35 = require("react/jsx-runtime");
7275
7275
  var cn29 = (...values) => values.filter(Boolean).join(" ");
7276
7276
  var tabular = { fontVariantNumeric: "tabular-nums" };
7277
+ var clampPct = (value) => Math.min(100, Math.max(0, value));
7278
+ var formatSize = (size) => {
7279
+ if (size === void 0 || size === null) return void 0;
7280
+ if (typeof size === "string") return size.trim() || void 0;
7281
+ if (!Number.isFinite(size) || size < 0) return void 0;
7282
+ if (size < 1024) return `${Math.round(size)} B`;
7283
+ const units = ["KB", "MB", "GB"];
7284
+ let value = size / 1024;
7285
+ let unit = 0;
7286
+ while (value >= 1024 && unit < units.length - 1) {
7287
+ value /= 1024;
7288
+ unit += 1;
7289
+ }
7290
+ return `${value >= 10 ? Math.round(value) : Math.round(value * 10) / 10} ${units[unit]}`;
7291
+ };
7277
7292
  var FileUpload = React35.forwardRef(
7278
7293
  ({
7279
7294
  status = "idle",
7280
7295
  title = "Upload payouts file",
7281
7296
  hint = "CSV, up to 10 MB",
7282
7297
  accept = ".csv",
7283
- fileName = "payouts.csv",
7284
- fileSize = "42 KB",
7285
- progress = 0,
7298
+ fileName,
7299
+ fileSize,
7300
+ progress,
7286
7301
  errorLabel = "Failed",
7287
7302
  actionLabel = "Upload CSV",
7288
7303
  onFileSelect,
@@ -7292,17 +7307,24 @@ var FileUpload = React35.forwardRef(
7292
7307
  }, ref) => {
7293
7308
  const inputRef = React35.useRef(null);
7294
7309
  const [dragActive, setDragActive] = React35.useState(false);
7295
- const resolved = status === "idle" && dragActive ? "dragging" : status;
7296
- const dragging = resolved === "dragging";
7297
- const pct = Math.min(100, Math.max(0, progress));
7310
+ const name = typeof fileName === "string" ? fileName.trim() : "";
7311
+ const hasFile = name.length > 0;
7312
+ const sizeLabel = formatSize(fileSize);
7313
+ const resolved = !hasFile && status === "idle" && dragActive ? "dragging" : status;
7314
+ const dragging = !hasFile && resolved === "dragging";
7315
+ const failed = resolved === "error";
7316
+ const errorOnDropzone = failed && !hasFile;
7317
+ const pct = progress === void 0 ? resolved === "complete" ? 100 : 0 : clampPct(progress);
7318
+ const barPct = failed ? progress === void 0 ? 18 : Math.min(pct, 18) : pct;
7298
7319
  const openPicker = () => inputRef.current?.click();
7299
- const fileInput = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7320
+ const fileInput = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7300
7321
  Input,
7301
7322
  {
7302
7323
  ref: inputRef,
7303
7324
  type: "file",
7304
7325
  accept,
7305
7326
  ariaLabel: title,
7327
+ "aria-invalid": failed || void 0,
7306
7328
  chrome: "none",
7307
7329
  className: "sr-only",
7308
7330
  onChange: (event) => {
@@ -7310,8 +7332,8 @@ var FileUpload = React35.forwardRef(
7310
7332
  if (file) onFileSelect?.(file);
7311
7333
  }
7312
7334
  }
7313
- );
7314
- if (resolved === "idle" || dragging) {
7335
+ ) });
7336
+ if (!hasFile) {
7315
7337
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
7316
7338
  "div",
7317
7339
  {
@@ -7331,7 +7353,7 @@ var FileUpload = React35.forwardRef(
7331
7353
  className: cn29(
7332
7354
  "flex w-full flex-col items-center gap-md rounded-lg border border-dashed px-xl py-xl text-center",
7333
7355
  "transition duration-200 ease-out",
7334
- dragging ? "border-primary bg-primary-subdued/70" : "border-hairline-strong bg-canvas",
7356
+ dragging ? "border-primary bg-primary-subdued/70" : errorOnDropzone ? "border-semantic-error bg-canvas" : "border-hairline-strong bg-canvas",
7335
7357
  className
7336
7358
  ),
7337
7359
  ...rest,
@@ -7351,7 +7373,7 @@ var FileUpload = React35.forwardRef(
7351
7373
  strokeWidth: 1.25,
7352
7374
  className: cn29(
7353
7375
  "transition-colors duration-200 ease-out",
7354
- dragging ? "text-primary" : "text-ink"
7376
+ dragging ? "text-primary" : errorOnDropzone ? "text-semantic-error" : "text-ink"
7355
7377
  )
7356
7378
  }
7357
7379
  ),
@@ -7363,7 +7385,7 @@ var FileUpload = React35.forwardRef(
7363
7385
  strokeWidth: 2,
7364
7386
  className: cn29(
7365
7387
  "absolute left-1/2 top-[60%] -translate-x-1/2 -translate-y-1/2 transition-colors duration-200 ease-out",
7366
- dragging ? "text-primary" : "text-ink"
7388
+ dragging ? "text-primary" : errorOnDropzone ? "text-semantic-error" : "text-ink"
7367
7389
  )
7368
7390
  }
7369
7391
  )
@@ -7383,12 +7405,12 @@ var FileUpload = React35.forwardRef(
7383
7405
  ),
7384
7406
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-caption text-muted", children: hint })
7385
7407
  ] }),
7386
- dragging ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "secondary", size: "sm", onClick: openPicker, children: actionLabel })
7408
+ dragging ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "secondary", size: "sm", onClick: openPicker, children: actionLabel }),
7409
+ errorOnDropzone ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "aria-live": "polite", className: "text-caption text-semantic-error", children: errorLabel }) : null
7387
7410
  ]
7388
7411
  }
7389
7412
  );
7390
7413
  }
7391
- const failed = resolved === "error";
7392
7414
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
7393
7415
  "div",
7394
7416
  {
@@ -7401,18 +7423,27 @@ var FileUpload = React35.forwardRef(
7401
7423
  ),
7402
7424
  ...rest,
7403
7425
  children: [
7426
+ fileInput,
7404
7427
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-start gap-md", children: [
7405
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "file", size: 20, strokeWidth: 1.5, className: "mt-xxs text-ink" }),
7428
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7429
+ Icon,
7430
+ {
7431
+ name: "file",
7432
+ size: 20,
7433
+ strokeWidth: 1.5,
7434
+ className: "mt-xxs text-ink"
7435
+ }
7436
+ ),
7406
7437
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1", children: [
7407
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "truncate text-body-md text-ink", children: fileName }),
7408
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-xxs text-caption text-muted", children: fileSize })
7438
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "truncate text-body-md text-ink", children: name }),
7439
+ sizeLabel ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-xxs text-caption text-muted", children: sizeLabel }) : null
7409
7440
  ] }),
7410
7441
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7411
7442
  Button,
7412
7443
  {
7413
7444
  variant: "bare",
7414
7445
  size: "inline",
7415
- "aria-label": `Remove ${fileName}`,
7446
+ "aria-label": `Remove ${name}`,
7416
7447
  onClick: onRemove,
7417
7448
  className: "-mr-xs -mt-xs shrink-0 rounded-sm p-xs text-muted hover:text-ink",
7418
7449
  children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "x", size: 16, strokeWidth: 1.75 })
@@ -7424,7 +7455,7 @@ var FileUpload = React35.forwardRef(
7424
7455
  "div",
7425
7456
  {
7426
7457
  role: "progressbar",
7427
- "aria-label": `${fileName} upload progress`,
7458
+ "aria-label": `${name} upload progress`,
7428
7459
  "aria-valuemin": 0,
7429
7460
  "aria-valuemax": 100,
7430
7461
  "aria-valuenow": failed ? void 0 : pct,
@@ -7438,7 +7469,7 @@ var FileUpload = React35.forwardRef(
7438
7469
  "block h-full rounded-full transition-[width,background-color] duration-200 ease-out",
7439
7470
  failed ? "bg-semantic-error" : "bg-primary"
7440
7471
  ),
7441
- style: { width: `${failed ? Math.min(pct, 18) : pct}%` }
7472
+ style: { width: `${barPct}%` }
7442
7473
  }
7443
7474
  )
7444
7475
  }
@@ -10633,6 +10664,7 @@ var React54 = __toESM(require("react"));
10633
10664
  var import_jsx_runtime54 = require("react/jsx-runtime");
10634
10665
  var cn46 = (...values) => values.filter(Boolean).join(" ");
10635
10666
  var tabular2 = { fontFeatureSettings: '"tnum"' };
10667
+ var NARROW_FEED_WIDTH = 560;
10636
10668
  var defaultFilters = [
10637
10669
  { value: "all", label: "All" },
10638
10670
  { value: "payouts", label: "Payouts" },
@@ -10710,9 +10742,39 @@ var defaultItems = [
10710
10742
  filter: "risk"
10711
10743
  }
10712
10744
  ];
10745
+ function useMergedRef(forwarded, internal) {
10746
+ return React54.useCallback(
10747
+ (node) => {
10748
+ internal.current = node;
10749
+ if (typeof forwarded === "function") forwarded(node);
10750
+ else if (forwarded) {
10751
+ forwarded.current = node;
10752
+ }
10753
+ },
10754
+ [forwarded, internal]
10755
+ );
10756
+ }
10757
+ function useNarrowContainer(ref) {
10758
+ const [narrow, setNarrow] = React54.useState(false);
10759
+ React54.useLayoutEffect(() => {
10760
+ const node = ref.current;
10761
+ if (!node) return;
10762
+ const measure = (width) => setNarrow(width < NARROW_FEED_WIDTH);
10763
+ measure(node.getBoundingClientRect().width);
10764
+ if (typeof ResizeObserver === "undefined") return;
10765
+ const observer = new ResizeObserver((entries) => {
10766
+ const entry = entries[0];
10767
+ if (entry) measure(entry.contentRect.width);
10768
+ });
10769
+ observer.observe(node);
10770
+ return () => observer.disconnect();
10771
+ }, [ref]);
10772
+ return narrow;
10773
+ }
10713
10774
  var NotificationFeed = React54.forwardRef(
10714
10775
  ({
10715
10776
  title = "Notification center / feed",
10777
+ titleSize = "lg",
10716
10778
  filters = defaultFilters,
10717
10779
  items,
10718
10780
  filter,
@@ -10730,6 +10792,9 @@ var NotificationFeed = React54.forwardRef(
10730
10792
  className,
10731
10793
  ...rest
10732
10794
  }, ref) => {
10795
+ const internalRef = React54.useRef(null);
10796
+ const setRootRef = useMergedRef(ref, internalRef);
10797
+ const narrow = useNarrowContainer(internalRef);
10733
10798
  const isFilterControlled = filter !== void 0;
10734
10799
  const [internalFilter, setInternalFilter] = React54.useState(defaultFilter);
10735
10800
  const activeFilter = isFilterControlled ? filter : internalFilter;
@@ -10751,6 +10816,8 @@ var NotificationFeed = React54.forwardRef(
10751
10816
  );
10752
10817
  const unreadCount = visible.filter((item) => item.unread).length;
10753
10818
  const isBare = chrome === "bare";
10819
+ const hasTitle = title !== null;
10820
+ const hasFilterRow = filters.length > 0 || modes.length > 0 || Boolean(actions);
10754
10821
  const handleItemClick = (item, event) => {
10755
10822
  if (!onItemClick) return;
10756
10823
  if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey || event.button !== 0) {
@@ -10760,157 +10827,247 @@ var NotificationFeed = React54.forwardRef(
10760
10827
  event.preventDefault();
10761
10828
  onItemClick(item, event);
10762
10829
  };
10763
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { ref, className: cn46("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-col gap-lg", children: [
10764
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-wrap items-start justify-between gap-md", children: [
10765
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
10766
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "text-display-lg text-ink", children: title }),
10767
- unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10768
- "span",
10830
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10831
+ "div",
10832
+ {
10833
+ ref: setRootRef,
10834
+ className: cn46("@container w-full", className),
10835
+ ...rest,
10836
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-col gap-lg", children: [
10837
+ hasTitle ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-wrap items-start justify-between gap-md", children: [
10838
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
10839
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10840
+ "h2",
10841
+ {
10842
+ className: cn46(
10843
+ "text-ink",
10844
+ titleSize === "md" ? "text-heading-md" : "text-display-lg"
10845
+ ),
10846
+ children: title
10847
+ }
10848
+ ),
10849
+ unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10850
+ "span",
10851
+ {
10852
+ className: cn46(
10853
+ "inline-flex shrink-0 items-center justify-center rounded-full bg-primary px-xs text-body-sm text-on-primary"
10854
+ ),
10855
+ style: tabular2,
10856
+ children: [
10857
+ unreadCount,
10858
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "sr-only", children: [
10859
+ " ",
10860
+ "unread",
10861
+ " ",
10862
+ unreadCount === 1 ? "notification" : "notifications"
10863
+ ] })
10864
+ ]
10865
+ }
10866
+ ) : null
10867
+ ] }),
10868
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "ml-auto flex shrink-0 items-center gap-sm", children: actions }) : null
10869
+ ] }) : null,
10870
+ hasFilterRow ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10871
+ "div",
10769
10872
  {
10770
10873
  className: cn46(
10771
- "inline-flex shrink-0 items-center justify-center rounded-full bg-primary px-xs text-body-sm text-on-primary"
10874
+ "flex w-full gap-md",
10875
+ narrow ? "flex-col" : "flex-row flex-wrap items-center justify-between"
10772
10876
  ),
10773
- style: tabular2,
10774
10877
  children: [
10775
- unreadCount,
10776
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "sr-only", children: [
10777
- " ",
10778
- "unread ",
10779
- unreadCount === 1 ? "notification" : "notifications"
10780
- ] })
10878
+ filters.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10879
+ "div",
10880
+ {
10881
+ role: "group",
10882
+ "aria-label": "Filter notifications",
10883
+ className: cn46(
10884
+ "min-w-0",
10885
+ narrow ? (
10886
+ // One scrollable line of pills instead of a second row.
10887
+ "w-full overflow-x-auto pb-xxs"
10888
+ ) : "overflow-visible"
10889
+ ),
10890
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10891
+ "div",
10892
+ {
10893
+ className: cn46(
10894
+ "flex items-center gap-sm",
10895
+ narrow ? "w-max flex-nowrap" : "w-auto flex-wrap"
10896
+ ),
10897
+ children: filters.map((option) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10898
+ Chip,
10899
+ {
10900
+ size: "md",
10901
+ appearance: "quiet",
10902
+ selected: option.value === activeFilter,
10903
+ onClick: () => selectFilter(option.value),
10904
+ children: option.label
10905
+ },
10906
+ option.value
10907
+ ))
10908
+ }
10909
+ )
10910
+ }
10911
+ ) : null,
10912
+ modes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-full min-w-0 shrink-0 max-w-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10913
+ ButtonGroup,
10914
+ {
10915
+ options: modes,
10916
+ value: activeMode,
10917
+ onValueChange: selectMode,
10918
+ label: "Notification mode",
10919
+ size: "sm"
10920
+ }
10921
+ ) }) : null,
10922
+ !hasTitle && actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10923
+ "div",
10924
+ {
10925
+ className: cn46(
10926
+ "flex shrink-0 items-center gap-sm",
10927
+ narrow ? "w-full" : "ml-auto w-auto"
10928
+ ),
10929
+ children: actions
10930
+ }
10931
+ ) : null
10781
10932
  ]
10782
10933
  }
10783
- ) : null
10784
- ] }),
10785
- actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "ml-auto flex shrink-0 items-center gap-sm", children: actions }) : null
10786
- ] }),
10787
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-wrap items-center justify-between gap-md", children: [
10788
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10789
- "div",
10790
- {
10791
- role: "group",
10792
- "aria-label": "Filter notifications",
10793
- className: "flex flex-wrap items-center gap-sm",
10794
- children: filters.map((option) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10795
- Chip,
10796
- {
10797
- size: "md",
10798
- appearance: "quiet",
10799
- selected: option.value === activeFilter,
10800
- onClick: () => selectFilter(option.value),
10801
- children: option.label
10802
- },
10803
- option.value
10804
- ))
10805
- }
10806
- ),
10807
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "w-full shrink-0 sm:ml-auto sm:max-w-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10808
- ButtonGroup,
10809
- {
10810
- options: modes,
10811
- value: activeMode,
10812
- onValueChange: selectMode,
10813
- label: "Notification mode",
10814
- size: "sm"
10815
- }
10816
- ) })
10817
- ] }),
10818
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10819
- "section",
10820
- {
10821
- "aria-label": feedLabel,
10822
- className: cn46(
10823
- "w-full",
10824
- isBare ? "overflow-hidden" : "overflow-hidden rounded-lg border border-hairline bg-canvas shadow-card"
10825
- ),
10826
- children: visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10827
- "p",
10934
+ ) : null,
10935
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10936
+ "section",
10828
10937
  {
10938
+ "aria-label": feedLabel,
10829
10939
  className: cn46(
10830
- "text-body-md text-muted",
10831
- isBare ? "py-xl" : "px-xxl py-xl"
10940
+ "w-full",
10941
+ isBare ? "overflow-hidden" : "overflow-hidden rounded-lg border border-hairline bg-canvas shadow-card"
10832
10942
  ),
10833
- children: emptyMessage
10834
- }
10835
- ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "flex w-full flex-col", children: visible.map((item, index) => {
10836
- const isFirst = index === 0;
10837
- const isLast = index === visible.length - 1;
10838
- const needsTopRule = index > 0;
10839
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10840
- "li",
10841
- {
10842
- className: cn46(
10843
- "relative flex w-full items-center gap-lg py-lg pr-xl pl-xxl",
10844
- needsTopRule && "border-t border-hairline"
10845
- ),
10846
- children: [
10847
- item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10848
- "span",
10849
- {
10850
- "aria-hidden": "true",
10851
- className: "absolute inset-y-0 left-0 w-xs bg-primary"
10852
- }
10853
- ) : null,
10854
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10855
- "div",
10856
- {
10857
- "aria-hidden": "true",
10858
- className: "relative flex w-xl shrink-0 items-center justify-center self-stretch",
10859
- children: [
10860
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10861
- "span",
10862
- {
10863
- className: cn46(
10864
- "absolute left-1/2 w-px -translate-x-1/2 bg-hairline",
10865
- isFirst ? "top-1/2" : "-top-lg",
10866
- isLast ? "bottom-1/2" : "-bottom-lg"
10867
- )
10868
- }
10869
- ),
10870
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10871
- "span",
10872
- {
10873
- className: cn46(
10874
- "relative size-md rounded-full ring-2 ring-canvas",
10875
- item.unread ? "bg-primary" : "bg-muted-soft"
10876
- )
10877
- }
10878
- )
10879
- ]
10880
- }
10881
- ),
10882
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
10883
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-body-md font-weight-label text-ink", children: item.title }),
10884
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-body-md text-muted", style: tabular2, children: item.description }),
10885
- item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: "Unread" }) : null
10886
- ] }),
10887
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10888
- "p",
10889
- {
10890
- className: "hidden shrink-0 whitespace-nowrap text-body-md text-muted sm:block sm:min-w-[7.5rem]",
10891
- style: tabular2,
10892
- children: item.timestamp
10893
- }
10943
+ children: visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10944
+ "p",
10945
+ {
10946
+ className: cn46(
10947
+ "text-body-md text-muted",
10948
+ isBare ? "py-xl" : "px-xxl py-xl"
10894
10949
  ),
10895
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10896
- Link,
10897
- {
10898
- href: item.href,
10899
- size: "md",
10900
- underline: "always",
10901
- className: "whitespace-nowrap",
10902
- onClick: (event) => handleItemClick(item, event),
10903
- children: item.linkLabel ?? "View details"
10904
- }
10905
- ) })
10906
- ]
10907
- },
10908
- item.id
10909
- );
10910
- }) })
10911
- }
10912
- )
10913
- ] }) });
10950
+ children: emptyMessage
10951
+ }
10952
+ ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "flex w-full flex-col", children: visible.map((item, index) => {
10953
+ const isFirst = index === 0;
10954
+ const isLast = index === visible.length - 1;
10955
+ const needsTopRule = index > 0;
10956
+ const timestampNode = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10957
+ "p",
10958
+ {
10959
+ className: cn46(
10960
+ "shrink-0 whitespace-nowrap text-muted",
10961
+ narrow ? "text-body-sm" : "text-body-md"
10962
+ ),
10963
+ style: tabular2,
10964
+ children: item.timestamp
10965
+ }
10966
+ );
10967
+ const actionNode = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10968
+ Link,
10969
+ {
10970
+ href: item.href,
10971
+ size: "md",
10972
+ underline: "always",
10973
+ className: "whitespace-nowrap",
10974
+ onClick: (event) => handleItemClick(item, event),
10975
+ children: item.linkLabel ?? "View details"
10976
+ }
10977
+ ) });
10978
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10979
+ "li",
10980
+ {
10981
+ className: cn46(
10982
+ "relative flex w-full",
10983
+ narrow ? "items-start gap-md py-md pr-md pl-lg" : "items-center gap-lg py-lg pr-xl pl-xxl",
10984
+ needsTopRule && "border-t border-hairline"
10985
+ ),
10986
+ children: [
10987
+ item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10988
+ "span",
10989
+ {
10990
+ "aria-hidden": "true",
10991
+ className: "absolute inset-y-0 left-0 w-xs bg-primary"
10992
+ }
10993
+ ) : null,
10994
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10995
+ "div",
10996
+ {
10997
+ "aria-hidden": "true",
10998
+ className: "relative flex w-xl shrink-0 items-center justify-center self-stretch",
10999
+ children: [
11000
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11001
+ "span",
11002
+ {
11003
+ className: cn46(
11004
+ "absolute left-1/2 w-px -translate-x-1/2 bg-hairline",
11005
+ isFirst ? "top-1/2" : narrow ? "-top-md" : "-top-lg",
11006
+ isLast ? "bottom-1/2" : narrow ? "-bottom-md" : "-bottom-lg"
11007
+ )
11008
+ }
11009
+ ),
11010
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11011
+ "span",
11012
+ {
11013
+ className: cn46(
11014
+ "relative size-md rounded-full ring-2 ring-canvas",
11015
+ item.unread ? "bg-primary" : "bg-muted-soft"
11016
+ )
11017
+ }
11018
+ )
11019
+ ]
11020
+ }
11021
+ ),
11022
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
11023
+ "div",
11024
+ {
11025
+ className: cn46(
11026
+ "flex min-w-0 flex-1 flex-col gap-xxs",
11027
+ narrow ? void 0 : "max-w-none"
11028
+ ),
11029
+ children: [
11030
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11031
+ "p",
11032
+ {
11033
+ className: cn46(
11034
+ "text-body-md font-weight-label text-ink",
11035
+ narrow ? "truncate" : "whitespace-normal wrap-break-word"
11036
+ ),
11037
+ children: item.title
11038
+ }
11039
+ ),
11040
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11041
+ "p",
11042
+ {
11043
+ className: cn46(
11044
+ "text-body-md text-muted",
11045
+ narrow ? "line-clamp-2" : void 0
11046
+ ),
11047
+ style: tabular2,
11048
+ children: item.description
11049
+ }
11050
+ ),
11051
+ item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: "Unread" }) : null,
11052
+ narrow ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mt-xxs flex w-full min-w-0 items-center justify-between gap-sm", children: [
11053
+ timestampNode,
11054
+ actionNode
11055
+ ] }) : null
11056
+ ]
11057
+ }
11058
+ ),
11059
+ !narrow ? timestampNode : null,
11060
+ !narrow ? actionNode : null
11061
+ ]
11062
+ },
11063
+ item.id
11064
+ );
11065
+ }) })
11066
+ }
11067
+ )
11068
+ ] })
11069
+ }
11070
+ );
10914
11071
  }
10915
11072
  );
10916
11073
  NotificationFeed.displayName = "NotificationFeed";