@designa8/vibedesign-stripe-deepseek-85ea 0.2.0 → 0.2.2

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-85ea
2
2
 
3
- Complete design system generated by Atoms Design, version **0.2.0**.
3
+ Complete design system generated by Atoms Design, version **0.2.2**.
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
@@ -6995,6 +6995,19 @@ var Drawer = React35.forwardRef(
6995
6995
  }, [open, autoFocusNote]);
6996
6996
  const accessibleName = ariaLabel ?? (typeof title === "string" ? title : void 0);
6997
6997
  const noteIsDisabled = noteDisabled ?? actionDisabled;
6998
+ const body = children === void 0 ? null : children;
6999
+ const hasCustomBody = children !== void 0;
7000
+ const footerNode = footer === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7001
+ Button,
7002
+ {
7003
+ variant: "primary",
7004
+ size: "lg",
7005
+ fullWidth: true,
7006
+ disabled: actionDisabled,
7007
+ onClick: onAction,
7008
+ children: actionLabel
7009
+ }
7010
+ ) : footer;
6998
7011
  const panel = !mounted || typeof document === "undefined" ? null : ReactDOM5.createPortal(
6999
7012
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
7000
7013
  "div",
@@ -7010,8 +7023,9 @@ var Drawer = React35.forwardRef(
7010
7023
  style: { zIndex: "var(--z-modal, 1200)" },
7011
7024
  className: cn28(
7012
7025
  "fixed inset-0 flex overflow-hidden",
7026
+ "transition-[visibility] duration-200 ease-out",
7013
7027
  side === "right" ? "justify-end" : "justify-start",
7014
- open ? "" : "pointer-events-none"
7028
+ open ? "visible" : "invisible pointer-events-none"
7015
7029
  ),
7016
7030
  ...rest,
7017
7031
  children: [
@@ -7023,7 +7037,7 @@ var Drawer = React35.forwardRef(
7023
7037
  className: cn28(
7024
7038
  "absolute inset-0 bg-scrim/40",
7025
7039
  "transition-opacity duration-200 ease-out",
7026
- "data-[state=closed]:opacity-0 data-[state=open]:opacity-100"
7040
+ open ? "opacity-100" : "opacity-0"
7027
7041
  )
7028
7042
  }
7029
7043
  ),
@@ -7034,8 +7048,11 @@ var Drawer = React35.forwardRef(
7034
7048
  "data-state": open ? "open" : "closed",
7035
7049
  className: cn28(
7036
7050
  "relative flex h-full w-full flex-col overflow-hidden bg-surface shadow-overlay",
7037
- "pointer-events-auto transition-transform duration-200 ease-out",
7038
- side === "right" ? "data-[state=closed]:translate-x-full sm:rounded-l-lg" : "data-[state=closed]:-translate-x-full sm:rounded-r-lg",
7051
+ "transition-transform duration-200 ease-out",
7052
+ open ? "translate-x-0" : "",
7053
+ !open && side === "right" ? "translate-x-full" : "",
7054
+ !open && side === "left" ? "-translate-x-full" : "",
7055
+ side === "right" ? "sm:rounded-l-lg" : "sm:rounded-r-lg",
7039
7056
  "sm:w-[var(--container-drawer,360px)]",
7040
7057
  className
7041
7058
  ),
@@ -7061,7 +7078,7 @@ var Drawer = React35.forwardRef(
7061
7078
  }
7062
7079
  )
7063
7080
  ] }),
7064
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children: children ?? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-xl", children: [
7081
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children: hasCustomBody ? body : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-xl", children: [
7065
7082
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-lg", children: [
7066
7083
  status ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7067
7084
  Badge,
@@ -7098,17 +7115,7 @@ var Drawer = React35.forwardRef(
7098
7115
  }
7099
7116
  ) : null
7100
7117
  ] }) }),
7101
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "shrink-0 px-xl pt-md pb-xl", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7102
- Button,
7103
- {
7104
- variant: "primary",
7105
- size: "lg",
7106
- fullWidth: true,
7107
- disabled: actionDisabled,
7108
- onClick: onAction,
7109
- children: actionLabel
7110
- }
7111
- ) })
7118
+ footerNode ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "shrink-0 px-xl pt-md pb-xl", children: footerNode }) : null
7112
7119
  ]
7113
7120
  }
7114
7121
  )
@@ -9637,8 +9644,7 @@ var Modal = React50.forwardRef(
9637
9644
  contained ? "max-h-full" : placement === "top" ? "max-h-[calc(88dvh-1rem)]" : "max-h-[calc(100dvh-2rem)]",
9638
9645
  "rounded-lg border border-hairline bg-surface shadow-overlay",
9639
9646
  "transition duration-200 ease-out",
9640
- "data-[state=open]:translate-y-0 data-[state=open]:scale-100 data-[state=open]:opacity-100",
9641
- "data-[state=closed]:translate-y-2 data-[state=closed]:scale-[0.98] data-[state=closed]:opacity-0",
9647
+ isOpen ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 opacity-0",
9642
9648
  className
9643
9649
  ),
9644
9650
  ...rest,
@@ -9745,7 +9751,7 @@ var Modal = React50.forwardRef(
9745
9751
  contained ? "absolute inset-0" : "fixed inset-0",
9746
9752
  placement === "top" ? "items-start px-base pt-[12dvh]" : "items-center p-base",
9747
9753
  "transition duration-200 ease-out",
9748
- "data-[state=closed]:pointer-events-none data-[state=closed]:invisible"
9754
+ isOpen ? "visible" : "invisible pointer-events-none"
9749
9755
  ),
9750
9756
  style: { zIndex: "var(--z-modal, 1200)" },
9751
9757
  children: [
@@ -9762,7 +9768,7 @@ var Modal = React50.forwardRef(
9762
9768
  style: scrimStyle(contained),
9763
9769
  className: cn41(
9764
9770
  "transition-opacity duration-200 ease-out",
9765
- "data-[state=open]:opacity-100 data-[state=closed]:opacity-0"
9771
+ isOpen ? "opacity-100" : "opacity-0"
9766
9772
  )
9767
9773
  }
9768
9774
  ),
@@ -14663,12 +14669,59 @@ var glyph3 = (name, size = 16, strokeWidth = 1.75) => /* @__PURE__ */ (0, import
14663
14669
  style: { color: "inherit" }
14664
14670
  }
14665
14671
  );
14672
+ var hasBadge = (badge) => {
14673
+ if (badge === void 0 || badge === null) {
14674
+ return false;
14675
+ }
14676
+ if (typeof badge === "number") {
14677
+ return Number.isFinite(badge) && badge !== 0;
14678
+ }
14679
+ const trimmed = badge.trim();
14680
+ return trimmed.length > 0 && trimmed !== "0";
14681
+ };
14682
+ var badgeText = (badge) => typeof badge === "number" ? badge > 99 ? "99+" : String(badge) : badge.trim();
14683
+ var rowAccessibleName = (label, badge) => {
14684
+ if (!hasBadge(badge)) {
14685
+ return label;
14686
+ }
14687
+ return typeof badge === "number" ? `${label}, ${badge} pending` : `${label}, ${badgeText(badge)}`;
14688
+ };
14689
+ var RailBadge = ({
14690
+ badge,
14691
+ active
14692
+ }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14693
+ "span",
14694
+ {
14695
+ "aria-hidden": "true",
14696
+ "data-active": active || void 0,
14697
+ className: cn65(
14698
+ "ml-auto flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full",
14699
+ "bg-primary px-xxs text-caption text-on-primary",
14700
+ "data-[active=true]:bg-on-primary data-[active=true]:text-primary"
14701
+ ),
14702
+ children: badgeText(badge)
14703
+ }
14704
+ );
14705
+ var railGlyph = (item, folded) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "relative inline-flex shrink-0 items-center", children: [
14706
+ glyph3(item.icon, 16, 1.75),
14707
+ folded && hasBadge(item.badge) ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14708
+ "span",
14709
+ {
14710
+ "aria-hidden": "true",
14711
+ className: cn65(
14712
+ "pointer-events-none absolute -right-xxs -top-xxs size-2 rounded-full",
14713
+ "bg-primary",
14714
+ "group-data-[active=true]:bg-on-primary"
14715
+ )
14716
+ }
14717
+ ) : null
14718
+ ] });
14666
14719
  var RowLabel = ({
14667
14720
  folded,
14668
14721
  children
14669
14722
  }) => folded ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "sr-only", children }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate", children });
14670
14723
  var railRowClass = (active, folded) => cn65(
14671
- "flex w-full cursor-pointer items-center rounded-lg border-0 bg-transparent",
14724
+ "group flex w-full cursor-pointer items-center rounded-lg border-0 bg-transparent",
14672
14725
  "text-body-md transition duration-150 ease-out",
14673
14726
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
14674
14727
  "focus-visible:ring-inset",
@@ -15004,6 +15057,7 @@ var SidebarDesktop = React74.forwardRef(
15004
15057
  className: "flex flex-col gap-xxs",
15005
15058
  children: navItems.map((item) => {
15006
15059
  const active = item.id === activeId;
15060
+ const badged = hasBadge(item.badge);
15007
15061
  if (!item.children?.length) {
15008
15062
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15009
15063
  "a",
@@ -15011,11 +15065,13 @@ var SidebarDesktop = React74.forwardRef(
15011
15065
  href: item.href ?? `#${item.id}`,
15012
15066
  onClick: navigate({ id: item.id, href: item.href }),
15013
15067
  "aria-current": active ? "page" : void 0,
15014
- "aria-label": isFolded ? item.label : void 0,
15068
+ "data-active": active,
15069
+ "aria-label": isFolded || badged ? rowAccessibleName(item.label, item.badge) : void 0,
15015
15070
  className: railRowClass(active, isFolded),
15016
15071
  children: [
15017
- glyph3(item.icon, 16, 1.75),
15018
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RowLabel, { folded: isFolded, children: item.label })
15072
+ railGlyph(item, isFolded),
15073
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RowLabel, { folded: isFolded, children: item.label }),
15074
+ !isFolded && badged ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RailBadge, { badge: item.badge, active }) : null
15019
15075
  ]
15020
15076
  },
15021
15077
  item.id
@@ -15031,22 +15087,32 @@ var SidebarDesktop = React74.forwardRef(
15031
15087
  size: "rail",
15032
15088
  "aria-expanded": expanded,
15033
15089
  "aria-controls": subId,
15034
- "aria-label": isFolded ? item.label : void 0,
15090
+ "aria-label": isFolded || badged ? rowAccessibleName(item.label, item.badge) : void 0,
15035
15091
  "data-active": active,
15036
15092
  "data-folded": isFolded,
15037
15093
  onClick: () => toggleExpanded(item.id),
15038
- leadingIcon: glyph3(item.icon, 16, 1.75),
15039
- trailingIcon: isFolded ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15040
- "span",
15041
- {
15042
- "aria-hidden": "true",
15043
- className: cn65(
15044
- "flex shrink-0 items-center transition-transform duration-200 ease-out",
15045
- expanded ? "rotate-180" : "rotate-0"
15046
- ),
15047
- children: glyph3("chevron-down", 16, 2)
15048
- }
15049
- ),
15094
+ className: "group",
15095
+ leadingIcon: railGlyph(item, isFolded),
15096
+ trailingIcon: isFolded ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "flex items-center gap-xs", children: [
15097
+ badged ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15098
+ RailBadge,
15099
+ {
15100
+ badge: item.badge,
15101
+ active
15102
+ }
15103
+ ) : null,
15104
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15105
+ "span",
15106
+ {
15107
+ "aria-hidden": "true",
15108
+ className: cn65(
15109
+ "flex shrink-0 items-center transition-transform duration-200 ease-out",
15110
+ expanded ? "rotate-180" : "rotate-0"
15111
+ ),
15112
+ children: glyph3("chevron-down", 16, 2)
15113
+ }
15114
+ )
15115
+ ] }),
15050
15116
  children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RowLabel, { folded: isFolded, children: item.label })
15051
15117
  }
15052
15118
  ),
@@ -15099,17 +15165,20 @@ var SidebarDesktop = React74.forwardRef(
15099
15165
  ),
15100
15166
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("nav", { "aria-label": "Secondary", className: "mt-lg flex flex-col gap-xxs", children: secondaryNav.map((item) => {
15101
15167
  const active = item.id === secondaryActiveId;
15168
+ const badged = hasBadge(item.badge);
15102
15169
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15103
15170
  "a",
15104
15171
  {
15105
15172
  href: item.href ?? `#${item.id}`,
15106
15173
  onClick: navigate({ id: item.id, href: item.href }),
15107
15174
  "aria-current": active ? "page" : void 0,
15108
- "aria-label": isFolded ? item.label : void 0,
15175
+ "data-active": active,
15176
+ "aria-label": isFolded || badged ? rowAccessibleName(item.label, item.badge) : void 0,
15109
15177
  className: railRowClass(active, isFolded),
15110
15178
  children: [
15111
- glyph3(item.icon, 16, 1.75),
15112
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RowLabel, { folded: isFolded, children: item.label })
15179
+ railGlyph(item, isFolded),
15180
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RowLabel, { folded: isFolded, children: item.label }),
15181
+ !isFolded && badged ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RailBadge, { badge: item.badge, active }) : null
15113
15182
  ]
15114
15183
  },
15115
15184
  item.id
@@ -15236,6 +15305,39 @@ var SAMPLE_SECONDARY2 = [
15236
15305
  ];
15237
15306
  var SAMPLE_PLAN2 = { name: "Pro", price: "$2,400.00 / month", href: "#plan" };
15238
15307
  var glyph4 = (name, size = 18, strokeWidth = 1.75) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon, { name, size, strokeWidth, style: { color: "inherit" } });
15308
+ var hasBadge2 = (badge) => {
15309
+ if (badge === void 0 || badge === null) {
15310
+ return false;
15311
+ }
15312
+ if (typeof badge === "number") {
15313
+ return Number.isFinite(badge) && badge !== 0;
15314
+ }
15315
+ const trimmed = badge.trim();
15316
+ return trimmed.length > 0 && trimmed !== "0";
15317
+ };
15318
+ var badgeText2 = (badge) => typeof badge === "number" ? badge > 99 ? "99+" : String(badge) : badge.trim();
15319
+ var rowAccessibleName2 = (label, badge) => {
15320
+ if (!hasBadge2(badge)) {
15321
+ return label;
15322
+ }
15323
+ return typeof badge === "number" ? `${label}, ${badge} pending` : `${label}, ${badgeText2(badge)}`;
15324
+ };
15325
+ var NavBadge = ({
15326
+ badge,
15327
+ active
15328
+ }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15329
+ "span",
15330
+ {
15331
+ "aria-hidden": "true",
15332
+ "data-active": active || void 0,
15333
+ className: cn66(
15334
+ "ml-auto flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full",
15335
+ "bg-primary px-xxs text-caption text-on-primary",
15336
+ "data-[active=true]:bg-on-primary data-[active=true]:text-primary"
15337
+ ),
15338
+ children: badgeText2(badge)
15339
+ }
15340
+ );
15239
15341
  var rowClass = (active) => cn66(
15240
15342
  "flex min-h-10 w-full cursor-pointer items-center gap-md rounded-lg px-md py-sm",
15241
15343
  "text-body-md transition duration-150 ease-out",
@@ -15548,6 +15650,7 @@ var SidebarMobile = React75.forwardRef(
15548
15650
  ] }),
15549
15651
  /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("nav", { "aria-label": "Primary", className: "mt-md flex flex-col gap-xxs", children: navItems.map((item) => {
15550
15652
  const active = item.id === activeId;
15653
+ const badged = hasBadge2(item.badge);
15551
15654
  if (!item.children?.length) {
15552
15655
  return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
15553
15656
  "a",
@@ -15555,10 +15658,18 @@ var SidebarMobile = React75.forwardRef(
15555
15658
  href: item.href ?? `#${item.id}`,
15556
15659
  onClick: navigate({ id: item.id, href: item.href }),
15557
15660
  "aria-current": active ? "page" : void 0,
15661
+ "aria-label": badged ? rowAccessibleName2(item.label, item.badge) : void 0,
15558
15662
  className: rowClass(active),
15559
15663
  children: [
15560
15664
  glyph4(item.icon, 18, 1.75),
15561
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "truncate", children: item.label })
15665
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "truncate", children: item.label }),
15666
+ badged ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15667
+ NavBadge,
15668
+ {
15669
+ badge: item.badge,
15670
+ active
15671
+ }
15672
+ ) : null
15562
15673
  ]
15563
15674
  },
15564
15675
  item.id
@@ -15574,20 +15685,31 @@ var SidebarMobile = React75.forwardRef(
15574
15685
  size: "rail",
15575
15686
  "aria-expanded": expanded,
15576
15687
  "aria-controls": subId,
15688
+ "aria-label": badged ? rowAccessibleName2(item.label, item.badge) : void 0,
15577
15689
  "data-active": active,
15578
15690
  onClick: () => toggleExpanded(item.id),
15579
15691
  className: "px-md",
15580
15692
  leadingIcon: glyph4(item.icon, 18, 1.75),
15581
- trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15582
- "span",
15583
- {
15584
- className: cn66(
15585
- "flex shrink-0 items-center transition-transform duration-200 ease-out",
15586
- expanded ? "rotate-180" : "rotate-0"
15587
- ),
15588
- children: glyph4("chevron-down", 18, 2)
15589
- }
15590
- ),
15693
+ trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "flex items-center gap-xs", children: [
15694
+ badged ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15695
+ NavBadge,
15696
+ {
15697
+ badge: item.badge,
15698
+ active
15699
+ }
15700
+ ) : null,
15701
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15702
+ "span",
15703
+ {
15704
+ "aria-hidden": "true",
15705
+ className: cn66(
15706
+ "flex shrink-0 items-center transition-transform duration-200 ease-out",
15707
+ expanded ? "rotate-180" : "rotate-0"
15708
+ ),
15709
+ children: glyph4("chevron-down", 18, 2)
15710
+ }
15711
+ )
15712
+ ] }),
15591
15713
  children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "truncate text-left", children: item.label })
15592
15714
  }
15593
15715
  ),
@@ -15643,16 +15765,25 @@ var SidebarMobile = React75.forwardRef(
15643
15765
  /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Divider, { className: "my-md" }),
15644
15766
  /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("nav", { "aria-label": "Secondary", className: "flex flex-col gap-xxs", children: secondaryNav.map((item) => {
15645
15767
  const active = item.id === secondaryActiveId;
15768
+ const badged = hasBadge2(item.badge);
15646
15769
  return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
15647
15770
  "a",
15648
15771
  {
15649
15772
  href: item.href ?? `#${item.id}`,
15650
15773
  onClick: navigate({ id: item.id, href: item.href }),
15651
15774
  "aria-current": active ? "page" : void 0,
15775
+ "aria-label": badged ? rowAccessibleName2(item.label, item.badge) : void 0,
15652
15776
  className: rowClass(active),
15653
15777
  children: [
15654
15778
  glyph4(item.icon, 18, 1.75),
15655
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "truncate", children: item.label })
15779
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "truncate", children: item.label }),
15780
+ badged ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15781
+ NavBadge,
15782
+ {
15783
+ badge: item.badge,
15784
+ active
15785
+ }
15786
+ ) : null
15656
15787
  ]
15657
15788
  },
15658
15789
  item.id