diff --git a/packages/plugin-game-theory/src/GameTheoryExplorer.tsx b/packages/plugin-game-theory/src/GameTheoryExplorer.tsx index 10038e7..3597c71 100644 --- a/packages/plugin-game-theory/src/GameTheoryExplorer.tsx +++ b/packages/plugin-game-theory/src/GameTheoryExplorer.tsx @@ -1,7 +1,7 @@ import { useState, useMemo, useCallback } from "react"; import { useGameTheoryData } from "./useGameTheoryData"; import type { GTNode } from "./useGameTheoryData"; -import { useTheme } from "@trustgraph/trustkit"; +import { useTheme, Button, Select } from "@trustgraph/trustkit"; import type { Theme } from "@trustgraph/trustkit"; const GT_SPINNER_ID = "gt-spinner-keyframes"; @@ -57,7 +57,8 @@ const NODE_SIZE = 30; /* Helper: Section header */ /* ------------------------------------------------------------------ */ -function Section({ title, color, borderColor, sz, children }: { title: string; color: string; borderColor?: string; sz: (px: number) => number; children: React.ReactNode }) { +function Section({ title, color, borderColor, children }: { title: string; color: string; borderColor?: string; children: React.ReactNode }) { + const { theme, sz } = useTheme(); return (
)} {actions.length > 0 && ( -
+
{actions.map(au => ( )} {payoffUris.length > 0 && ( -
+
{payoffUris.map(pu => { const plUri = data.payoffPlayer.get(pu); @@ -1250,38 +1251,28 @@ export function GameTheoryExplorer(_props: GameTheoryExplorerProps) { alignItems: "center", }}> {([["tree", "\u229E Game Tree"], ["matrix", "\u229E Payoff Matrix"], ["sandbox", "\u229E Sandbox"]] as const).map(([m, label]) => ( - + ))}
{games.length > 1 && ( - + )}
@@ -1333,22 +1324,14 @@ export function GameTheoryExplorer(_props: GameTheoryExplorerProps) { }}> Parameter Sandbox
- +
{/* Probability sliders */} {chanceActions.length > 0 && ( -
+
{chanceActions.map(ca => { const val = probOverrides.get(ca.actionUri) ?? data.probabilities.get(ca.actionUri) ?? 0; return ( @@ -1380,7 +1363,7 @@ export function GameTheoryExplorer(_props: GameTheoryExplorerProps) { {/* Payoff sliders */} {payoffEntries.length > 0 && ( -
+
{payoffEntries.map(pe => { const val = utilOverrides.get(pe.payoffUri) ?? data.utilities.get(pe.payoffUri) ?? 0; const col = playerColorMap.get(pe.playerUri) || theme.text.muted; diff --git a/packages/plugin-hwsec/src/HwSecExplorer.tsx b/packages/plugin-hwsec/src/HwSecExplorer.tsx index de21a40..49ee02f 100644 --- a/packages/plugin-hwsec/src/HwSecExplorer.tsx +++ b/packages/plugin-hwsec/src/HwSecExplorer.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useCallback } from "react"; -import { useTheme, LoadingState } from "@trustgraph/trustkit"; +import { useTheme, LoadingState, Input } from "@trustgraph/trustkit"; import type { Theme } from "@trustgraph/trustkit"; import { useHwSecData } from "./useHwSecData"; import type { HwNode } from "./useHwSecData"; @@ -77,7 +77,7 @@ function securityKindLabel(kind: string): string { } function Section({ title, color, children }: { title: string; color: string; children: React.ReactNode }) { - const { sz } = useTheme(); + const { theme, sz } = useTheme(); return (
- setSearchTerm(e.target.value)} - style={{ - flex: 1, maxWidth: 300, - padding: "5px 10px", borderRadius: 6, - background: "rgba(255,255,255,0.03)", - border: `1px solid ${theme.border.default}`, - color: theme.text.primary, fontSize: sz(11), - fontFamily: theme.font.sans, - outline: "none", - }} + onChange={setSearchTerm} + style={{ flex: 1, maxWidth: 300, fontSize: sz(11) }} />
βœ•
) : ( - { setSearch(e.target.value); setOpen(true); }} + onChange={v => { setSearch(v); setOpen(true); }} onFocus={() => setOpen(true)} placeholder={placeholder} autoFocus={open} - style={{ - width: "100%", padding: "8px 12px", borderRadius: 6, fontSize: sz(13), - background: "rgba(255,255,255,0.04)", border: `1px solid ${theme.border.default}`, - color: theme.text.primary, outline: "none", - fontFamily: theme.font.sans, - }} + style={{ fontSize: sz(13) }} /> )} {open && matches.length > 0 && ( @@ -846,20 +841,13 @@ export function GtmAdvisor(props: GtmAdvisorProps) { Use AI to synthesise the above intelligence into an actionable GTM plan
- +
)} diff --git a/packages/plugin-innovation/src/components/InnovationExplorer.tsx b/packages/plugin-innovation/src/components/InnovationExplorer.tsx index 2091adc..1701761 100644 --- a/packages/plugin-innovation/src/components/InnovationExplorer.tsx +++ b/packages/plugin-innovation/src/components/InnovationExplorer.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useCallback } from "react"; -import { useTheme, LoadingState } from "@trustgraph/trustkit"; +import { useTheme, LoadingState, Button, Input } from "@trustgraph/trustkit"; import type { Theme } from "@trustgraph/trustkit"; import { useInnovationData } from "../useInnovationData"; import type { IINode } from "../useInnovationData"; @@ -141,7 +141,7 @@ function matchesCategory(node: IINode, cat: CategoryFilter): boolean { } function Section({ title, color, children }: { title: string; color: string; children: React.ReactNode }) { - const { sz } = useTheme(); + const { theme, sz } = useTheme(); return (
{([["browse", "⊞ Browse"], ["pathfinder", "β‡’ Pathfinder"], ["gtm", "πŸš€ GTM Advisor"]] as const).map(([m, label]) => ( - + ))}
@@ -541,34 +536,23 @@ export function InnovationExplorer(_props: InnovationExplorerProps) { {/* Search */}
- setSearchTerm(e.target.value)} + onChange={setSearchTerm} placeholder="Search entities..." - style={{ - width: "100%", padding: "7px 10px", borderRadius: 6, fontSize: sz(12), - background: "rgba(255,255,255,0.04)", border: `1px solid ${theme.border.default}`, - color: theme.text.primary, outline: "none", - fontFamily: theme.font.sans, - }} /> {/* Category filters */}
{CATEGORIES.map(c => ( - + ))}
diff --git a/packages/plugin-innovation/src/components/PathFinder.tsx b/packages/plugin-innovation/src/components/PathFinder.tsx index 15feecb..73298fe 100644 --- a/packages/plugin-innovation/src/components/PathFinder.tsx +++ b/packages/plugin-innovation/src/components/PathFinder.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useCallback, useRef, useEffect } from "react"; -import { useTheme } from "@trustgraph/trustkit"; +import { useTheme, Button, Input } from "@trustgraph/trustkit"; import type { Theme } from "@trustgraph/trustkit"; import type { IINode } from "../useInnovationData"; @@ -121,18 +121,13 @@ function EntityPicker({ >βœ•
) : ( - { setSearch(e.target.value); setOpen(true); }} + onChange={v => { setSearch(v); setOpen(true); }} onFocus={() => setOpen(true)} placeholder={placeholder} autoFocus={open} - style={{ - width: "100%", padding: "8px 12px", borderRadius: 6, fontSize: sz(13), - background: "rgba(255,255,255,0.04)", border: `1px solid ${theme.border.default}`, - color: theme.text.primary, outline: "none", - fontFamily: theme.font.sans, - }} + style={{ fontSize: sz(13) }} /> )} {open && matches.length > 0 && ( @@ -755,23 +750,13 @@ export function PathFinder({ nodes, abbreviations, adjacency, onSelectNode }: Pa />
- +
diff --git a/packages/plugin-law/src/LawExplorer.tsx b/packages/plugin-law/src/LawExplorer.tsx index 5e08841..1ff14df 100644 --- a/packages/plugin-law/src/LawExplorer.tsx +++ b/packages/plugin-law/src/LawExplorer.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useCallback, useEffect } from "react"; -import { useTheme } from "@trustgraph/trustkit"; +import { useTheme, Button } from "@trustgraph/trustkit"; import type { Theme } from "@trustgraph/trustkit"; import { useLawData } from "./useLawData"; import type { @@ -1343,24 +1343,20 @@ export function LawExplorer(_props: LawExplorerProps) { overflow: "hidden", }}> {(["en", "lt"] as const).map(l => ( - + ))} @@ -1381,27 +1377,27 @@ export function LawExplorer(_props: LawExplorerProps) { {MODE_META.map(m => { const isActive = mode === m.key; return ( - + ); })} diff --git a/packages/plugin-retail-brand/src/components/brand-analytics/BrandAnalytics.tsx b/packages/plugin-retail-brand/src/components/brand-analytics/BrandAnalytics.tsx index 8bbe54d..70fc865 100644 --- a/packages/plugin-retail-brand/src/components/brand-analytics/BrandAnalytics.tsx +++ b/packages/plugin-retail-brand/src/components/brand-analytics/BrandAnalytics.tsx @@ -1,5 +1,5 @@ import { useState, useCallback, useRef, createContext, useContext } from "react"; -import { useTheme } from "@trustgraph/trustkit"; +import { useTheme, Button } from "@trustgraph/trustkit"; import { withGlow } from "@trustgraph/trustkit"; import { useBrandAnalytics, BUDGET_TIERS } from "../../hooks/useBrandAnalytics"; import { useProductScorecard } from "../../hooks/useProductScorecard"; @@ -94,21 +94,21 @@ function Pill({ active, color, onClick, children }: { onClick: () => void; children: React.ReactNode; }) { - const { theme, sz } = useTheme(); + const { theme } = useTheme(); return ( - + ); } @@ -141,17 +141,9 @@ function FilterBar({ ))} - + {categories.length > 0 && (
diff --git a/packages/plugin-retail-brand/src/components/retail/CartPanel.tsx b/packages/plugin-retail-brand/src/components/retail/CartPanel.tsx index fab2a80..875e599 100644 --- a/packages/plugin-retail-brand/src/components/retail/CartPanel.tsx +++ b/packages/plugin-retail-brand/src/components/retail/CartPanel.tsx @@ -1,4 +1,4 @@ -import { useTheme } from "@trustgraph/trustkit"; +import { useTheme, Button } from "@trustgraph/trustkit"; import { withGlow } from "@trustgraph/trustkit"; import type { CartItem } from "../../hooks/useRetailCart"; import type { RecommendedProduct } from "../../hooks/useRetailBuild"; @@ -111,21 +111,14 @@ function ExtraItemRow({ item, onRemove }: { item: CartItem; onRemove: () => void }}> ${item.price.toFixed(0)} - +
); } @@ -185,23 +178,14 @@ function CrossSellCard({ product, onAdd }: { product: RecommendedProduct; onAdd:
- +
); @@ -370,24 +354,14 @@ export function CartPanel({ {/* Place order button */} {isFinalized && ( - + )}