@trading-game/design-intelligence-layer 0.17.1 → 0.17.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/dist/index.d.cts CHANGED
@@ -62,7 +62,7 @@ interface AlertProps extends Omit<React$1.ComponentProps<"div">, "title">, Varia
62
62
  declare function Alert({ variant, layout, title, description, icon, action, actions, onDismiss, dismissLabel, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
63
63
 
64
64
  declare const buttonVariants: (props?: ({
65
- variant?: "primary" | "primary-inverse" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
65
+ variant?: "primary" | "primary-inverse" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
66
66
  size?: "lg" | "md" | "sm" | "xs" | "icon" | "icon-lg" | "icon-md" | "icon-sm" | "icon-xs" | null | undefined;
67
67
  } & class_variance_authority_types.ClassProp) | undefined) => string;
68
68
  declare function Button({ className, variant, size, asChild, loading, children, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -454,7 +454,17 @@ declare function InputOTPSeparator({ ...props }: React$1.ComponentProps<"div">):
454
454
 
455
455
  declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
456
456
 
457
- declare function ItemGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
457
+ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentProps<"div"> & {
458
+ /**
459
+ * Auto-divide consecutive default-variant `Item`s with a bottom border
460
+ * (`border-border-subtle`). The last item's bottom border is suppressed,
461
+ * and non-default variants (`outline`, `muted`) are left untouched so
462
+ * they don't double up with their own borders. Defaults to `true`; pass
463
+ * `false` to opt out when the design wants flush items or uses
464
+ * `<ItemSeparator />` manually.
465
+ */
466
+ divider?: boolean;
467
+ }): react_jsx_runtime.JSX.Element;
458
468
  declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
459
469
  declare const itemVariants: (props?: ({
460
470
  variant?: "default" | "outline" | "muted" | null | undefined;
package/dist/index.d.ts CHANGED
@@ -62,7 +62,7 @@ interface AlertProps extends Omit<React$1.ComponentProps<"div">, "title">, Varia
62
62
  declare function Alert({ variant, layout, title, description, icon, action, actions, onDismiss, dismissLabel, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
63
63
 
64
64
  declare const buttonVariants: (props?: ({
65
- variant?: "primary" | "primary-inverse" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
65
+ variant?: "primary" | "primary-inverse" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
66
66
  size?: "lg" | "md" | "sm" | "xs" | "icon" | "icon-lg" | "icon-md" | "icon-sm" | "icon-xs" | null | undefined;
67
67
  } & class_variance_authority_types.ClassProp) | undefined) => string;
68
68
  declare function Button({ className, variant, size, asChild, loading, children, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -454,7 +454,17 @@ declare function InputOTPSeparator({ ...props }: React$1.ComponentProps<"div">):
454
454
 
455
455
  declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
456
456
 
457
- declare function ItemGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
457
+ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentProps<"div"> & {
458
+ /**
459
+ * Auto-divide consecutive default-variant `Item`s with a bottom border
460
+ * (`border-border-subtle`). The last item's bottom border is suppressed,
461
+ * and non-default variants (`outline`, `muted`) are left untouched so
462
+ * they don't double up with their own borders. Defaults to `true`; pass
463
+ * `false` to opt out when the design wants flush items or uses
464
+ * `<ItemSeparator />` manually.
465
+ */
466
+ divider?: boolean;
467
+ }): react_jsx_runtime.JSX.Element;
458
468
  declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
459
469
  declare const itemVariants: (props?: ({
460
470
  variant?: "default" | "outline" | "muted" | null | undefined;
package/dist/index.js CHANGED
@@ -173,6 +173,14 @@ var buttonVariants = cva(
173
173
  primary: "bg-primary text-on-primary hover:bg-primary-hover",
174
174
  // Primary Inverse — white bg + blue text; for use on dark/coloured surfaces
175
175
  "primary-inverse": "bg-primary-inverse text-on-primary-inverse hover:bg-primary-inverse/80",
176
+ // Primary Shimmer — same surface as `primary` plus a sweeping
177
+ // white shimmer overlay (same animation as the TicketCard deposit
178
+ // stub). Use for headline CTAs that need to draw the eye.
179
+ "primary-shimmer": "relative overflow-hidden bg-primary text-on-primary hover:bg-primary-hover",
180
+ // Primary Inverse Shimmer — same surface as `primary-inverse` plus
181
+ // a sweeping brand-blue shimmer (white shimmer would be invisible
182
+ // on the white surface). For headline CTAs on dark/coloured pages.
183
+ "primary-inverse-shimmer": "relative overflow-hidden bg-primary-inverse text-on-primary-inverse hover:bg-primary-inverse/80",
176
184
  secondary: "bg-transparent border-[1.5px] border-border-prominent text-on-prominent hover:bg-secondary-hover",
177
185
  // Secondary Inverse — white border + white text; for use on dark/coloured surfaces
178
186
  "secondary-inverse": "bg-transparent border-[1.5px] border-primary-inverse text-on-prominent-inverse hover:bg-primary-inverse/10",
@@ -207,6 +215,13 @@ var spinnerSizeMap = {
207
215
  "icon-sm": "size-3.5",
208
216
  "icon-xs": "size-3"
209
217
  };
218
+ var shimmerGradients = {
219
+ // 110° tilts the bright band forward so the sweep reads as a diagonal
220
+ // shine. Three stops around 50% (soft → mid → soft) shape the highlight
221
+ // like a polished-metal gleam without going too bright at the peak.
222
+ "primary-shimmer": "linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.10) 40%, rgba(255,255,255,0.20) 50%, rgba(255,255,255,0.10) 60%, transparent 80%)",
223
+ "primary-inverse-shimmer": "linear-gradient(110deg, transparent 20%, rgba(35,35,255,0.07) 40%, rgba(35,35,255,0.14) 50%, rgba(35,35,255,0.07) 60%, transparent 80%)"
224
+ };
210
225
  function Button(_a) {
211
226
  var _b = _a, {
212
227
  className,
@@ -224,7 +239,7 @@ function Button(_a) {
224
239
  "children"
225
240
  ]);
226
241
  const Comp = asChild ? Slot.Root : "button";
227
- return /* @__PURE__ */ jsx3(
242
+ return /* @__PURE__ */ jsxs3(
228
243
  Comp,
229
244
  __spreadProps(__spreadValues({
230
245
  "data-slot": "button",
@@ -237,10 +252,20 @@ function Button(_a) {
237
252
  ),
238
253
  "aria-busy": loading || void 0
239
254
  }, props), {
240
- children: loading ? /* @__PURE__ */ jsxs3(Fragment, { children: [
241
- /* @__PURE__ */ jsx3("span", { className: "invisible inline-flex items-center gap-[inherit]", "aria-hidden": true, children }),
242
- /* @__PURE__ */ jsx3("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx3(Spinner, { className: spinnerSizeMap[size != null ? size : "lg"] }) })
243
- ] }) : children
255
+ children: [
256
+ variant && shimmerGradients[variant] && !loading && !props.disabled ? /* @__PURE__ */ jsx3(
257
+ "span",
258
+ {
259
+ "aria-hidden": true,
260
+ className: "pointer-events-none absolute inset-0 [animation:button-shimmer_4s_linear_infinite]",
261
+ style: { background: shimmerGradients[variant] }
262
+ }
263
+ ) : null,
264
+ loading ? /* @__PURE__ */ jsxs3(Fragment, { children: [
265
+ /* @__PURE__ */ jsx3("span", { className: "invisible inline-flex items-center gap-[inherit]", "aria-hidden": true, children }),
266
+ /* @__PURE__ */ jsx3("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx3(Spinner, { className: spinnerSizeMap[size != null ? size : "lg"] }) })
267
+ ] }) : children
268
+ ]
244
269
  })
245
270
  );
246
271
  }
@@ -771,7 +796,7 @@ var badgeVariants = cva3(
771
796
  "fill-success": "bg-semantic-win/10 border-transparent text-semantic-win",
772
797
  "fill-fail": "bg-semantic-loss/10 border-transparent text-semantic-loss",
773
798
  "fill-warning": "bg-semantic-warning/10 border-transparent text-semantic-warning",
774
- "fill-credit": "bg-semantic-boost-surface border-transparent text-on-semantic-boost !text-xs !font-bold",
799
+ "fill-credit": "bg-semantic-boost-surface backdrop-blur-md text-on-primary",
775
800
  // Demo / test-mode flag — opaque light-peach surface + red-orange text.
776
801
  // Uses --semantic-demo-surface (a solid color-mix of demo @ 10% with white)
777
802
  // so the badge looks identical on any background.
@@ -3966,13 +3991,37 @@ import { cva as cva9 } from "class-variance-authority";
3966
3991
  import { Slot as Slot5 } from "radix-ui";
3967
3992
  import { jsx as jsx35 } from "react/jsx-runtime";
3968
3993
  function ItemGroup(_a) {
3969
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3994
+ var _b = _a, {
3995
+ className,
3996
+ divider = true
3997
+ } = _b, props = __objRest(_b, [
3998
+ "className",
3999
+ "divider"
4000
+ ]);
3970
4001
  return /* @__PURE__ */ jsx35(
3971
4002
  "div",
3972
4003
  __spreadValues({
3973
4004
  role: "list",
3974
4005
  "data-slot": "item-group",
3975
- className: cn("group/item-group flex flex-col", className)
4006
+ "data-divider": divider ? "true" : void 0,
4007
+ className: cn(
4008
+ "group/item-group flex flex-col",
4009
+ // Divider mode: 4 px gap between items + a 1 px line drawn via
4010
+ // ::after on each non-last default item, sitting in that gap.
4011
+ // Item itself stays border-free — the line is a separate visual
4012
+ // element rather than an outline on the item.
4013
+ divider && [
4014
+ "gap-1",
4015
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:relative",
4016
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:content-['']",
4017
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:absolute",
4018
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:-bottom-0.5",
4019
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:inset-x-4",
4020
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:h-px",
4021
+ "[&>[data-slot=item][data-variant=default]:not(:last-child)]:after:bg-border-subtle"
4022
+ ],
4023
+ className
4024
+ )
3976
4025
  }, props)
3977
4026
  );
3978
4027
  }