@trading-game/design-intelligence-layer 1.0.7 → 1.1.0
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/AGENTS.md +3 -3
- package/dist/index.cjs +30 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/docs/components/badge.md +21 -4
- package/docs/components/item.md +25 -7
- package/docs/foundations/colors.md +3 -3
- package/docs/foundations/shape-layout.md +2 -2
- package/guides/brand-voice/trading-game-brand-voice.md +10 -11
- package/package.json +1 -1
- package/guides/rules/design-system-consuming-project.mdc +0 -366
package/dist/index.d.cts
CHANGED
|
@@ -123,7 +123,7 @@ declare function AvatarGroupCount({ className, ...props }: React$1.ComponentProp
|
|
|
123
123
|
|
|
124
124
|
declare const badgeVariants: (props?: ({
|
|
125
125
|
variant?: "solid" | "solid-demo" | "solid-neutral" | "solid-success" | "solid-fail" | "solid-warning" | "tint" | "tint-demo" | "tint-neutral" | "tint-success" | "tint-fail" | "tint-warning" | null | undefined;
|
|
126
|
-
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
126
|
+
size?: "lg" | "md" | "sm" | "xs" | "count" | null | undefined;
|
|
127
127
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
128
128
|
declare function Badge({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
129
129
|
asChild?: boolean;
|
|
@@ -465,7 +465,7 @@ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentPr
|
|
|
465
465
|
/**
|
|
466
466
|
* Auto-divide consecutive default-variant `Item`s with a bottom border
|
|
467
467
|
* (`border-default-default`). The last item's bottom border is suppressed,
|
|
468
|
-
* and non-default variants (`outline`, `muted`) are left untouched so
|
|
468
|
+
* and non-default variants (`outline`, `fill`, `muted`) are left untouched so
|
|
469
469
|
* they don't double up with their own borders. Defaults to `true`; pass
|
|
470
470
|
* `false` to opt out when the design wants flush items or uses
|
|
471
471
|
* `<ItemSeparator />` manually.
|
|
@@ -474,7 +474,7 @@ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentPr
|
|
|
474
474
|
}): react_jsx_runtime.JSX.Element;
|
|
475
475
|
declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
476
476
|
declare const itemVariants: (props?: ({
|
|
477
|
-
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
477
|
+
variant?: "fill" | "default" | "outline" | "muted" | null | undefined;
|
|
478
478
|
size?: "sm" | "default" | null | undefined;
|
|
479
479
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
480
480
|
declare function Item({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -123,7 +123,7 @@ declare function AvatarGroupCount({ className, ...props }: React$1.ComponentProp
|
|
|
123
123
|
|
|
124
124
|
declare const badgeVariants: (props?: ({
|
|
125
125
|
variant?: "solid" | "solid-demo" | "solid-neutral" | "solid-success" | "solid-fail" | "solid-warning" | "tint" | "tint-demo" | "tint-neutral" | "tint-success" | "tint-fail" | "tint-warning" | null | undefined;
|
|
126
|
-
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
126
|
+
size?: "lg" | "md" | "sm" | "xs" | "count" | null | undefined;
|
|
127
127
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
128
128
|
declare function Badge({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
129
129
|
asChild?: boolean;
|
|
@@ -465,7 +465,7 @@ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentPr
|
|
|
465
465
|
/**
|
|
466
466
|
* Auto-divide consecutive default-variant `Item`s with a bottom border
|
|
467
467
|
* (`border-default-default`). The last item's bottom border is suppressed,
|
|
468
|
-
* and non-default variants (`outline`, `muted`) are left untouched so
|
|
468
|
+
* and non-default variants (`outline`, `fill`, `muted`) are left untouched so
|
|
469
469
|
* they don't double up with their own borders. Defaults to `true`; pass
|
|
470
470
|
* `false` to opt out when the design wants flush items or uses
|
|
471
471
|
* `<ItemSeparator />` manually.
|
|
@@ -474,7 +474,7 @@ declare function ItemGroup({ className, divider, ...props }: React$1.ComponentPr
|
|
|
474
474
|
}): react_jsx_runtime.JSX.Element;
|
|
475
475
|
declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
476
476
|
declare const itemVariants: (props?: ({
|
|
477
|
-
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
477
|
+
variant?: "fill" | "default" | "outline" | "muted" | null | undefined;
|
|
478
478
|
size?: "sm" | "default" | null | undefined;
|
|
479
479
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
480
480
|
declare function Item({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
package/dist/index.js
CHANGED
|
@@ -935,9 +935,11 @@ var badgeVariants = cva4(
|
|
|
935
935
|
"solid-fail": "bg-background-error-solid text-text-on-status-static",
|
|
936
936
|
"solid-warning": "bg-background-warning-solid text-text-on-status-static",
|
|
937
937
|
// Tint — the Section Message surface tokens, coloured foreground.
|
|
938
|
-
// Brand tint
|
|
939
|
-
//
|
|
940
|
-
|
|
938
|
+
// Brand tint rides `brand-selected`, the theme-aware selection
|
|
939
|
+
// family, for the same reason Calendar's range band does: the
|
|
940
|
+
// static `brand-container` is one value in both themes and sits
|
|
941
|
+
// near-white on a dark surface.
|
|
942
|
+
tint: "bg-background-brand-selected border-transparent text-text-brand-selected",
|
|
941
943
|
"tint-demo": "bg-background-demo-default border-transparent text-text-demo-default",
|
|
942
944
|
"tint-neutral": "bg-background-secondary-surface border-transparent text-text-prominent-default",
|
|
943
945
|
"tint-success": "bg-background-success-default border-transparent text-text-success-default",
|
|
@@ -948,7 +950,18 @@ var badgeVariants = cva4(
|
|
|
948
950
|
xs: "type-badge-xs h-5 px-2 py-0.5",
|
|
949
951
|
sm: "type-badge-sm h-6 px-2.5 py-0.5",
|
|
950
952
|
md: "type-badge-md h-8 px-3 py-1",
|
|
951
|
-
lg: "type-badge-lg h-10 px-4 py-1.5"
|
|
953
|
+
lg: "type-badge-lg h-10 px-4 py-1.5",
|
|
954
|
+
/* `count` is a shape, not a step on the xs/sm/md/lg rail: an
|
|
955
|
+
18px disc that grows into a pill as digits are added. The
|
|
956
|
+
padding is deliberately tight (`px-1`): one digit then
|
|
957
|
+
measures under the 18px min-width, so min-width wins and the
|
|
958
|
+
disc is a true circle. Widen the padding and a single digit
|
|
959
|
+
overshoots 18px, turning it back into an oval. `tabular-nums` keeps every digit
|
|
960
|
+
the same width, so a ticking count only resizes when the
|
|
961
|
+
digit count changes, not on every update. Callers that pin
|
|
962
|
+
it over other chrome add their own knockout ring — Badge
|
|
963
|
+
cannot know what sits behind it. */
|
|
964
|
+
count: "type-badge-xs min-w-[1.125rem] h-[1.125rem] px-1 tabular-nums"
|
|
952
965
|
}
|
|
953
966
|
},
|
|
954
967
|
defaultVariants: {
|
|
@@ -4281,12 +4294,21 @@ function ItemSeparator(_a) {
|
|
|
4281
4294
|
);
|
|
4282
4295
|
}
|
|
4283
4296
|
var itemVariants = cva10(
|
|
4284
|
-
"group/item type-item-description flex flex-wrap items-center rounded-
|
|
4297
|
+
"group/item type-item-description flex flex-wrap items-center rounded-2xl border border-transparent transition-colors duration-instant outline-none focus-visible:border-ring-focus-default focus-visible:ring-[3px] focus-visible:ring-ring-focus-strong [a]:transition-colors [a]:hover:bg-background-hover-default",
|
|
4285
4298
|
{
|
|
4286
4299
|
variants: {
|
|
4287
4300
|
variant: {
|
|
4288
4301
|
default: "bg-transparent",
|
|
4289
4302
|
outline: "border-border-default-default text-text-prominent-default hover:bg-background-hover-default",
|
|
4303
|
+
/* `fill` is `outline` plus a solid surface: a bordered card that reads
|
|
4304
|
+
as its own plane on the page canvas, the wallet-ledger pattern.
|
|
4305
|
+
Its hover steps primary -> secondary surface like the default Chip,
|
|
4306
|
+
because the shared `background-hover-default` glaze is translucent —
|
|
4307
|
+
laid over a filled row it would let the canvas show through instead
|
|
4308
|
+
of darkening the fill. The `[a]:` rule repeats for the same reason:
|
|
4309
|
+
the base link hover is that same glaze and outranks a plain
|
|
4310
|
+
`hover:` on an anchor. */
|
|
4311
|
+
fill: "bg-background-primary-surface border-border-default-default text-text-prominent-default hover:bg-background-secondary-surface [a]:hover:bg-background-secondary-surface",
|
|
4290
4312
|
muted: "bg-background-secondary-surface"
|
|
4291
4313
|
},
|
|
4292
4314
|
size: {
|
|
@@ -7851,10 +7873,11 @@ function HistoryButton({
|
|
|
7851
7873
|
return /* @__PURE__ */ jsxs34("div", { className: "relative inline-flex", children: [
|
|
7852
7874
|
/* @__PURE__ */ jsx61(NavigationButton, { type: "button", size: "md", "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx61(History, { className: "size-5" }) }),
|
|
7853
7875
|
show && /* @__PURE__ */ jsx61(
|
|
7854
|
-
|
|
7876
|
+
Badge,
|
|
7855
7877
|
{
|
|
7856
7878
|
"aria-hidden": true,
|
|
7857
|
-
|
|
7879
|
+
size: "count",
|
|
7880
|
+
className: "pointer-events-none absolute -top-0.5 -right-0.5 ring-2 ring-background-primary-canvas",
|
|
7858
7881
|
children: label
|
|
7859
7882
|
}
|
|
7860
7883
|
)
|