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

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.3**.
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
@@ -10633,6 +10633,7 @@ var React54 = __toESM(require("react"));
10633
10633
  var import_jsx_runtime54 = require("react/jsx-runtime");
10634
10634
  var cn46 = (...values) => values.filter(Boolean).join(" ");
10635
10635
  var tabular2 = { fontFeatureSettings: '"tnum"' };
10636
+ var NARROW_FEED_WIDTH = 560;
10636
10637
  var defaultFilters = [
10637
10638
  { value: "all", label: "All" },
10638
10639
  { value: "payouts", label: "Payouts" },
@@ -10710,9 +10711,39 @@ var defaultItems = [
10710
10711
  filter: "risk"
10711
10712
  }
10712
10713
  ];
10714
+ function useMergedRef(forwarded, internal) {
10715
+ return React54.useCallback(
10716
+ (node) => {
10717
+ internal.current = node;
10718
+ if (typeof forwarded === "function") forwarded(node);
10719
+ else if (forwarded) {
10720
+ forwarded.current = node;
10721
+ }
10722
+ },
10723
+ [forwarded, internal]
10724
+ );
10725
+ }
10726
+ function useNarrowContainer(ref) {
10727
+ const [narrow, setNarrow] = React54.useState(false);
10728
+ React54.useLayoutEffect(() => {
10729
+ const node = ref.current;
10730
+ if (!node) return;
10731
+ const measure = (width) => setNarrow(width < NARROW_FEED_WIDTH);
10732
+ measure(node.getBoundingClientRect().width);
10733
+ if (typeof ResizeObserver === "undefined") return;
10734
+ const observer = new ResizeObserver((entries) => {
10735
+ const entry = entries[0];
10736
+ if (entry) measure(entry.contentRect.width);
10737
+ });
10738
+ observer.observe(node);
10739
+ return () => observer.disconnect();
10740
+ }, [ref]);
10741
+ return narrow;
10742
+ }
10713
10743
  var NotificationFeed = React54.forwardRef(
10714
10744
  ({
10715
10745
  title = "Notification center / feed",
10746
+ titleSize = "lg",
10716
10747
  filters = defaultFilters,
10717
10748
  items,
10718
10749
  filter,
@@ -10730,6 +10761,9 @@ var NotificationFeed = React54.forwardRef(
10730
10761
  className,
10731
10762
  ...rest
10732
10763
  }, ref) => {
10764
+ const internalRef = React54.useRef(null);
10765
+ const setRootRef = useMergedRef(ref, internalRef);
10766
+ const narrow = useNarrowContainer(internalRef);
10733
10767
  const isFilterControlled = filter !== void 0;
10734
10768
  const [internalFilter, setInternalFilter] = React54.useState(defaultFilter);
10735
10769
  const activeFilter = isFilterControlled ? filter : internalFilter;
@@ -10751,6 +10785,8 @@ var NotificationFeed = React54.forwardRef(
10751
10785
  );
10752
10786
  const unreadCount = visible.filter((item) => item.unread).length;
10753
10787
  const isBare = chrome === "bare";
10788
+ const hasTitle = title !== null;
10789
+ const hasFilterRow = filters.length > 0 || modes.length > 0 || Boolean(actions);
10754
10790
  const handleItemClick = (item, event) => {
10755
10791
  if (!onItemClick) return;
10756
10792
  if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey || event.button !== 0) {
@@ -10760,157 +10796,247 @@ var NotificationFeed = React54.forwardRef(
10760
10796
  event.preventDefault();
10761
10797
  onItemClick(item, event);
10762
10798
  };
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",
10799
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10800
+ "div",
10801
+ {
10802
+ ref: setRootRef,
10803
+ className: cn46("@container w-full", className),
10804
+ ...rest,
10805
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-col gap-lg", children: [
10806
+ hasTitle ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex w-full flex-wrap items-start justify-between gap-md", children: [
10807
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
10808
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10809
+ "h2",
10810
+ {
10811
+ className: cn46(
10812
+ "text-ink",
10813
+ titleSize === "md" ? "text-heading-md" : "text-display-lg"
10814
+ ),
10815
+ children: title
10816
+ }
10817
+ ),
10818
+ unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10819
+ "span",
10820
+ {
10821
+ className: cn46(
10822
+ "inline-flex shrink-0 items-center justify-center rounded-full bg-primary px-xs text-body-sm text-on-primary"
10823
+ ),
10824
+ style: tabular2,
10825
+ children: [
10826
+ unreadCount,
10827
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "sr-only", children: [
10828
+ " ",
10829
+ "unread",
10830
+ " ",
10831
+ unreadCount === 1 ? "notification" : "notifications"
10832
+ ] })
10833
+ ]
10834
+ }
10835
+ ) : null
10836
+ ] }),
10837
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "ml-auto flex shrink-0 items-center gap-sm", children: actions }) : null
10838
+ ] }) : null,
10839
+ hasFilterRow ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10840
+ "div",
10769
10841
  {
10770
10842
  className: cn46(
10771
- "inline-flex shrink-0 items-center justify-center rounded-full bg-primary px-xs text-body-sm text-on-primary"
10843
+ "flex w-full gap-md",
10844
+ narrow ? "flex-col" : "flex-row flex-wrap items-center justify-between"
10772
10845
  ),
10773
- style: tabular2,
10774
10846
  children: [
10775
- unreadCount,
10776
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "sr-only", children: [
10777
- " ",
10778
- "unread ",
10779
- unreadCount === 1 ? "notification" : "notifications"
10780
- ] })
10847
+ filters.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10848
+ "div",
10849
+ {
10850
+ role: "group",
10851
+ "aria-label": "Filter notifications",
10852
+ className: cn46(
10853
+ "min-w-0",
10854
+ narrow ? (
10855
+ // One scrollable line of pills instead of a second row.
10856
+ "w-full overflow-x-auto pb-xxs"
10857
+ ) : "overflow-visible"
10858
+ ),
10859
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10860
+ "div",
10861
+ {
10862
+ className: cn46(
10863
+ "flex items-center gap-sm",
10864
+ narrow ? "w-max flex-nowrap" : "w-auto flex-wrap"
10865
+ ),
10866
+ children: filters.map((option) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10867
+ Chip,
10868
+ {
10869
+ size: "md",
10870
+ appearance: "quiet",
10871
+ selected: option.value === activeFilter,
10872
+ onClick: () => selectFilter(option.value),
10873
+ children: option.label
10874
+ },
10875
+ option.value
10876
+ ))
10877
+ }
10878
+ )
10879
+ }
10880
+ ) : null,
10881
+ 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)(
10882
+ ButtonGroup,
10883
+ {
10884
+ options: modes,
10885
+ value: activeMode,
10886
+ onValueChange: selectMode,
10887
+ label: "Notification mode",
10888
+ size: "sm"
10889
+ }
10890
+ ) }) : null,
10891
+ !hasTitle && actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10892
+ "div",
10893
+ {
10894
+ className: cn46(
10895
+ "flex shrink-0 items-center gap-sm",
10896
+ narrow ? "w-full" : "ml-auto w-auto"
10897
+ ),
10898
+ children: actions
10899
+ }
10900
+ ) : null
10781
10901
  ]
10782
10902
  }
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",
10903
+ ) : null,
10904
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10905
+ "section",
10828
10906
  {
10907
+ "aria-label": feedLabel,
10829
10908
  className: cn46(
10830
- "text-body-md text-muted",
10831
- isBare ? "py-xl" : "px-xxl py-xl"
10909
+ "w-full",
10910
+ isBare ? "overflow-hidden" : "overflow-hidden rounded-lg border border-hairline bg-canvas shadow-card"
10832
10911
  ),
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
- }
10912
+ children: visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10913
+ "p",
10914
+ {
10915
+ className: cn46(
10916
+ "text-body-md text-muted",
10917
+ isBare ? "py-xl" : "px-xxl py-xl"
10894
10918
  ),
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
- ] }) });
10919
+ children: emptyMessage
10920
+ }
10921
+ ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "flex w-full flex-col", children: visible.map((item, index) => {
10922
+ const isFirst = index === 0;
10923
+ const isLast = index === visible.length - 1;
10924
+ const needsTopRule = index > 0;
10925
+ const timestampNode = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10926
+ "p",
10927
+ {
10928
+ className: cn46(
10929
+ "shrink-0 whitespace-nowrap text-muted",
10930
+ narrow ? "text-body-sm" : "text-body-md"
10931
+ ),
10932
+ style: tabular2,
10933
+ children: item.timestamp
10934
+ }
10935
+ );
10936
+ const actionNode = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10937
+ Link,
10938
+ {
10939
+ href: item.href,
10940
+ size: "md",
10941
+ underline: "always",
10942
+ className: "whitespace-nowrap",
10943
+ onClick: (event) => handleItemClick(item, event),
10944
+ children: item.linkLabel ?? "View details"
10945
+ }
10946
+ ) });
10947
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10948
+ "li",
10949
+ {
10950
+ className: cn46(
10951
+ "relative flex w-full",
10952
+ narrow ? "items-start gap-md py-md pr-md pl-lg" : "items-center gap-lg py-lg pr-xl pl-xxl",
10953
+ needsTopRule && "border-t border-hairline"
10954
+ ),
10955
+ children: [
10956
+ item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10957
+ "span",
10958
+ {
10959
+ "aria-hidden": "true",
10960
+ className: "absolute inset-y-0 left-0 w-xs bg-primary"
10961
+ }
10962
+ ) : null,
10963
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10964
+ "div",
10965
+ {
10966
+ "aria-hidden": "true",
10967
+ className: "relative flex w-xl shrink-0 items-center justify-center self-stretch",
10968
+ children: [
10969
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10970
+ "span",
10971
+ {
10972
+ className: cn46(
10973
+ "absolute left-1/2 w-px -translate-x-1/2 bg-hairline",
10974
+ isFirst ? "top-1/2" : narrow ? "-top-md" : "-top-lg",
10975
+ isLast ? "bottom-1/2" : narrow ? "-bottom-md" : "-bottom-lg"
10976
+ )
10977
+ }
10978
+ ),
10979
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
10980
+ "span",
10981
+ {
10982
+ className: cn46(
10983
+ "relative size-md rounded-full ring-2 ring-canvas",
10984
+ item.unread ? "bg-primary" : "bg-muted-soft"
10985
+ )
10986
+ }
10987
+ )
10988
+ ]
10989
+ }
10990
+ ),
10991
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
10992
+ "div",
10993
+ {
10994
+ className: cn46(
10995
+ "flex min-w-0 flex-1 flex-col gap-xxs",
10996
+ narrow ? void 0 : "max-w-none"
10997
+ ),
10998
+ children: [
10999
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11000
+ "p",
11001
+ {
11002
+ className: cn46(
11003
+ "text-body-md font-weight-label text-ink",
11004
+ narrow ? "truncate" : "whitespace-normal wrap-break-word"
11005
+ ),
11006
+ children: item.title
11007
+ }
11008
+ ),
11009
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11010
+ "p",
11011
+ {
11012
+ className: cn46(
11013
+ "text-body-md text-muted",
11014
+ narrow ? "line-clamp-2" : void 0
11015
+ ),
11016
+ style: tabular2,
11017
+ children: item.description
11018
+ }
11019
+ ),
11020
+ item.unread ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: "Unread" }) : null,
11021
+ narrow ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mt-xxs flex w-full min-w-0 items-center justify-between gap-sm", children: [
11022
+ timestampNode,
11023
+ actionNode
11024
+ ] }) : null
11025
+ ]
11026
+ }
11027
+ ),
11028
+ !narrow ? timestampNode : null,
11029
+ !narrow ? actionNode : null
11030
+ ]
11031
+ },
11032
+ item.id
11033
+ );
11034
+ }) })
11035
+ }
11036
+ )
11037
+ ] })
11038
+ }
11039
+ );
10914
11040
  }
10915
11041
  );
10916
11042
  NotificationFeed.displayName = "NotificationFeed";