@trading-game/design-intelligence-layer 0.15.0 → 0.15.1

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
@@ -149,7 +149,7 @@ npm install react react-dom tailwindcss
149
149
  | Table | `Table, TableHeader, TableBody, TableRow, TableHead, TableCell` |
150
150
  | Tabs | `Tabs, TabsList, TabsTrigger, TabsContent` |
151
151
  | Textarea | `Textarea` |
152
- | Ticket Card | `TicketCard`, `BoostTicketCard` |
152
+ | Ticket Card | `TicketCard`, `CreditTicketCard` |
153
153
  | Toast | `Toaster` |
154
154
  | Toggle | `Toggle, toggleVariants` |
155
155
  | Toggle Group | `ToggleGroup, ToggleGroupItem` |
@@ -233,7 +233,7 @@ States: hover (`bg-secondary-hover`), focus (3px `ring-ring/50`), active (`opaci
233
233
  <Badge variant="fill-success" /> // Green tint
234
234
  <Badge variant="fill-fail" /> // Red tint
235
235
  <Badge variant="fill-warning" /> // Orange tint
236
- <Badge variant="fill-boost" /> // Amber-orange tint — boost/bonus labels (pair with a Rocket icon)
236
+ <Badge variant="fill-credit" /> // Amber-orange tint — credit/bonus labels
237
237
 
238
238
  // Outline (black border, secondary-hover on hover)
239
239
  <Badge variant="outline" />
package/dist/index.cjs CHANGED
@@ -88,7 +88,6 @@ __export(index_exports, {
88
88
  AvatarGroupCount: () => AvatarGroupCount,
89
89
  AvatarImage: () => AvatarImage,
90
90
  Badge: () => Badge,
91
- BoostTicketCard: () => BoostTicketCard,
92
91
  Breadcrumb: () => Breadcrumb,
93
92
  BreadcrumbEllipsis: () => BreadcrumbEllipsis,
94
93
  BreadcrumbItem: () => BreadcrumbItem,
@@ -160,6 +159,7 @@ __export(index_exports, {
160
159
  ContextMenuSubContent: () => ContextMenuSubContent,
161
160
  ContextMenuSubTrigger: () => ContextMenuSubTrigger,
162
161
  ContextMenuTrigger: () => ContextMenuTrigger,
162
+ CreditTicketCard: () => CreditTicketCard,
163
163
  Dialog: () => Dialog,
164
164
  DialogClose: () => DialogClose,
165
165
  DialogContent: () => DialogContent,
@@ -965,7 +965,7 @@ var badgeVariants = (0, import_class_variance_authority3.cva)(
965
965
  "fill-success": "bg-semantic-win/10 border-transparent text-semantic-win",
966
966
  "fill-fail": "bg-semantic-loss/10 border-transparent text-semantic-loss",
967
967
  "fill-warning": "bg-semantic-warning/10 border-transparent text-semantic-warning",
968
- "fill-boost": "bg-semantic-boost/16 border-transparent text-on-semantic-boost !text-xs !font-semibold",
968
+ "fill-credit": "bg-semantic-boost/16 border-transparent text-on-semantic-boost !text-xs !font-semibold",
969
969
  // Ghost (transparent)
970
970
  ghost: "bg-transparent border-transparent text-primary [a&]:hover:bg-secondary-hover [a&]:hover:text-primary",
971
971
  "ghost-success": "bg-transparent border-transparent text-semantic-win [a&]:hover:bg-semantic-win/10 [a&]:hover:text-semantic-win",
@@ -6741,7 +6741,7 @@ function TicketCard({
6741
6741
  )
6742
6742
  ] }) });
6743
6743
  }
6744
- function BoostTicketCard({
6744
+ function CreditTicketCard({
6745
6745
  className,
6746
6746
  icon,
6747
6747
  label,
@@ -6750,34 +6750,37 @@ function BoostTicketCard({
6750
6750
  stubLabel,
6751
6751
  onStubClick,
6752
6752
  stubDisabled = false,
6753
- boostAmount = "0.00",
6754
- boostCurrency = "USDT",
6755
- boostInfo,
6756
- boostInfoSide = "top",
6757
- boostInfoAlign = "center",
6758
- boostInfoTitle,
6759
- boostInfoCloseLabel,
6753
+ badgeIcon,
6754
+ badgeLabel = "Label",
6755
+ badgeValue = "0.00",
6756
+ badgeCurrency = "USDT",
6757
+ badgeInfo,
6758
+ badgeInfoSide = "top",
6759
+ badgeInfoAlign = "center",
6760
+ badgeInfoTitle,
6761
+ badgeInfoCloseLabel,
6760
6762
  compact = false
6761
6763
  }) {
6762
6764
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("flex w-full flex-col gap-2", className), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "relative flex w-full items-stretch justify-between rounded-sm bg-subtle", children: [
6763
6765
  (() => {
6764
- const boostBadge = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Badge, { variant: "fill-boost", size: "sm", className: "!gap-1 !font-medium !tracking-normal", children: [
6765
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react23.Rocket, { className: "!size-3.5", strokeWidth: 2 }),
6766
- "Boost: ",
6767
- boostAmount,
6766
+ const creditBadge = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Badge, { variant: "fill-credit", size: "sm", className: "!gap-1 !font-medium !tracking-normal", children: [
6767
+ badgeIcon,
6768
+ badgeLabel,
6769
+ ": ",
6770
+ badgeValue,
6768
6771
  " ",
6769
- boostCurrency,
6770
- boostInfo && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip2, { children: [
6772
+ badgeCurrency,
6773
+ badgeInfo && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip2, { children: [
6771
6774
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6772
6775
  "button",
6773
6776
  {
6774
6777
  type: "button",
6775
- "aria-label": "More info about boost",
6778
+ "aria-label": `More info about ${badgeLabel.toLowerCase()}`,
6776
6779
  className: "inline-flex shrink-0 items-center justify-center rounded-full text-on-semantic-boost outline-none transition-opacity hover:opacity-70 focus-visible:opacity-70 focus-visible:ring-2 focus-visible:ring-on-semantic-boost/40 cursor-pointer",
6777
6780
  children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react23.Info, { className: "!size-3.5", strokeWidth: 2 })
6778
6781
  }
6779
6782
  ) }),
6780
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipContent, { side: boostInfoSide, align: boostInfoAlign, title: boostInfoTitle, closeLabel: boostInfoCloseLabel, variant: "inverse", className: "max-w-xs whitespace-normal", children: boostInfo })
6783
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipContent, { side: badgeInfoSide, align: badgeInfoAlign, title: badgeInfoTitle, closeLabel: badgeInfoCloseLabel, variant: "inverse", className: "max-w-xs whitespace-normal", children: badgeInfo })
6781
6784
  ] }) })
6782
6785
  ] });
6783
6786
  const labelValue = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
@@ -6796,7 +6799,7 @@ function BoostTicketCard({
6796
6799
  /* Mobile / compact: badge stacked under the value */
6797
6800
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-2 whitespace-nowrap", children: [
6798
6801
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-1", children: labelValue }),
6799
- boostBadge
6802
+ creditBadge
6800
6803
  ] })
6801
6804
  ) : (
6802
6805
  /* Desktop: badge inline next to the value (16px gap = gap-4) */
@@ -6810,7 +6813,7 @@ function BoostTicketCard({
6810
6813
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-sm text-on-subtle", children: currency })
6811
6814
  ] })
6812
6815
  ] }),
6813
- boostBadge
6816
+ creditBadge
6814
6817
  ] })
6815
6818
  ] })
6816
6819
  )
@@ -7499,7 +7502,6 @@ function DefaultEmptyState({ onViewHistory }) {
7499
7502
  AvatarGroupCount,
7500
7503
  AvatarImage,
7501
7504
  Badge,
7502
- BoostTicketCard,
7503
7505
  Breadcrumb,
7504
7506
  BreadcrumbEllipsis,
7505
7507
  BreadcrumbItem,
@@ -7571,6 +7573,7 @@ function DefaultEmptyState({ onViewHistory }) {
7571
7573
  ContextMenuSubContent,
7572
7574
  ContextMenuSubTrigger,
7573
7575
  ContextMenuTrigger,
7576
+ CreditTicketCard,
7574
7577
  Dialog,
7575
7578
  DialogClose,
7576
7579
  DialogContent,