@trading-game/design-intelligence-layer 0.17.2 → 0.17.4
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 +18 -2
- package/dist/index.cjs +84 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +84 -35
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +22 -5
- package/package.json +2 -2
- package/src/styles.css +6 -0
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" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
|
|
65
|
+
variant?: "primary" | "primary-inverse" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | "tertiary-inverse" | 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> & {
|
|
@@ -420,15 +420,18 @@ declare function HoverCardTrigger({ ...props }: React$1.ComponentProps<typeof Ho
|
|
|
420
420
|
declare function HoverCardContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime.JSX.Element;
|
|
421
421
|
|
|
422
422
|
declare const inputVariants: (props?: ({
|
|
423
|
+
variant?: "default" | "inverse" | null | undefined;
|
|
423
424
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
424
425
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
425
|
-
declare function Input({ className, type, size, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>): react_jsx_runtime.JSX.Element;
|
|
426
|
+
declare function Input({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>): react_jsx_runtime.JSX.Element;
|
|
426
427
|
|
|
427
428
|
type InputGroupSize = "sm" | "md" | "lg";
|
|
429
|
+
type InputGroupVariant = "default" | "inverse";
|
|
428
430
|
declare const inputGroupVariants: (props?: ({
|
|
431
|
+
variant?: "default" | "inverse" | null | undefined;
|
|
429
432
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
430
433
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
431
|
-
declare function InputGroup({ className, size, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>): react_jsx_runtime.JSX.Element;
|
|
434
|
+
declare function InputGroup({ className, variant, size, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>): react_jsx_runtime.JSX.Element;
|
|
432
435
|
declare const inputGroupAddonVariants: (props?: ({
|
|
433
436
|
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
434
437
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -438,8 +441,9 @@ declare const inputGroupButtonVariants: (props?: ({
|
|
|
438
441
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
439
442
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
440
443
|
declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
441
|
-
declare function InputGroupInput({ className, size: sizeProp, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
444
|
+
declare function InputGroupInput({ className, size: sizeProp, variant: variantProp, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
442
445
|
size?: InputGroupSize;
|
|
446
|
+
variant?: InputGroupVariant;
|
|
443
447
|
}): react_jsx_runtime.JSX.Element;
|
|
444
448
|
declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
445
449
|
|
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" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
|
|
65
|
+
variant?: "primary" | "primary-inverse" | "primary-shimmer" | "primary-inverse-shimmer" | "secondary" | "secondary-inverse" | "tertiary" | "tertiary-inverse" | 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> & {
|
|
@@ -420,15 +420,18 @@ declare function HoverCardTrigger({ ...props }: React$1.ComponentProps<typeof Ho
|
|
|
420
420
|
declare function HoverCardContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime.JSX.Element;
|
|
421
421
|
|
|
422
422
|
declare const inputVariants: (props?: ({
|
|
423
|
+
variant?: "default" | "inverse" | null | undefined;
|
|
423
424
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
424
425
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
425
|
-
declare function Input({ className, type, size, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>): react_jsx_runtime.JSX.Element;
|
|
426
|
+
declare function Input({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>): react_jsx_runtime.JSX.Element;
|
|
426
427
|
|
|
427
428
|
type InputGroupSize = "sm" | "md" | "lg";
|
|
429
|
+
type InputGroupVariant = "default" | "inverse";
|
|
428
430
|
declare const inputGroupVariants: (props?: ({
|
|
431
|
+
variant?: "default" | "inverse" | null | undefined;
|
|
429
432
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
430
433
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
431
|
-
declare function InputGroup({ className, size, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>): react_jsx_runtime.JSX.Element;
|
|
434
|
+
declare function InputGroup({ className, variant, size, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>): react_jsx_runtime.JSX.Element;
|
|
432
435
|
declare const inputGroupAddonVariants: (props?: ({
|
|
433
436
|
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
434
437
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -438,8 +441,9 @@ declare const inputGroupButtonVariants: (props?: ({
|
|
|
438
441
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
439
442
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
440
443
|
declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
441
|
-
declare function InputGroupInput({ className, size: sizeProp, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
444
|
+
declare function InputGroupInput({ className, size: sizeProp, variant: variantProp, ...props }: Omit<React$1.ComponentProps<"input">, "size"> & {
|
|
442
445
|
size?: InputGroupSize;
|
|
446
|
+
variant?: InputGroupVariant;
|
|
443
447
|
}): react_jsx_runtime.JSX.Element;
|
|
444
448
|
declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
445
449
|
|
package/dist/index.js
CHANGED
|
@@ -184,7 +184,9 @@ var buttonVariants = cva(
|
|
|
184
184
|
secondary: "bg-transparent border-[1.5px] border-border-prominent text-on-prominent hover:bg-secondary-hover",
|
|
185
185
|
// Secondary Inverse — white border + white text; for use on dark/coloured surfaces
|
|
186
186
|
"secondary-inverse": "bg-transparent border-[1.5px] border-primary-inverse text-on-prominent-inverse hover:bg-primary-inverse/10",
|
|
187
|
-
tertiary: "bg-transparent text-
|
|
187
|
+
tertiary: "bg-transparent text-on-prominent hover:bg-secondary-hover",
|
|
188
|
+
// Tertiary Inverse — transparent + white text/icon; for use on dark/coloured surfaces
|
|
189
|
+
"tertiary-inverse": "bg-transparent text-on-primary hover:bg-on-primary/[0.10]"
|
|
188
190
|
},
|
|
189
191
|
size: {
|
|
190
192
|
lg: "h-12 w-fit gap-3 rounded-xs px-6 py-[14px] text-base [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -848,7 +850,7 @@ import { Gift, X as X2 } from "lucide-react";
|
|
|
848
850
|
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
849
851
|
var SURFACE_CLASSES = "w-full rounded-sm border border-primary/[0.16] bg-primary/[0.08] px-4 py-3.5";
|
|
850
852
|
function IconBadge({ glyph }) {
|
|
851
|
-
return /* @__PURE__ */ jsx9("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-
|
|
853
|
+
return /* @__PURE__ */ jsx9("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-full bg-primary text-on-primary", children: glyph });
|
|
852
854
|
}
|
|
853
855
|
function Banner(_a) {
|
|
854
856
|
var _b = _a, {
|
|
@@ -1951,16 +1953,32 @@ import { cva as cva5 } from "class-variance-authority";
|
|
|
1951
1953
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1952
1954
|
var inputVariants = cva5(
|
|
1953
1955
|
[
|
|
1954
|
-
"w-full min-w-0 rounded-
|
|
1955
|
-
"
|
|
1956
|
-
"selection:bg-primary selection:text-on-primary",
|
|
1957
|
-
"file:inline-flex file:border-0 file:bg-transparent file:font-medium file:text-on-prominent",
|
|
1958
|
-
"placeholder:text-on-subtle",
|
|
1956
|
+
"w-full min-w-0 rounded-xs border font-body transition-[color,box-shadow] outline-none",
|
|
1957
|
+
"file:inline-flex file:border-0 file:bg-transparent file:font-medium",
|
|
1959
1958
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1960
|
-
"
|
|
1959
|
+
"read-only:pointer-events-none read-only:border-transparent read-only:bg-subtle/60",
|
|
1960
|
+
"focus-visible:ring-[3px]"
|
|
1961
1961
|
].join(" "),
|
|
1962
1962
|
{
|
|
1963
1963
|
variants: {
|
|
1964
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
1965
|
+
// dark-fill treatment for coloured surfaces (e.g. bg-primary).
|
|
1966
|
+
variant: {
|
|
1967
|
+
default: [
|
|
1968
|
+
"border-border-subtle bg-white/5 text-on-prominent",
|
|
1969
|
+
"file:text-on-prominent",
|
|
1970
|
+
"placeholder:text-on-subtle",
|
|
1971
|
+
"selection:bg-primary selection:text-on-primary",
|
|
1972
|
+
"focus-visible:border-primary focus-visible:ring-primary/[0.08]"
|
|
1973
|
+
].join(" "),
|
|
1974
|
+
inverse: [
|
|
1975
|
+
"border-on-primary/25 bg-input-inverse-surface text-on-primary",
|
|
1976
|
+
"file:text-on-primary",
|
|
1977
|
+
"placeholder:text-on-primary/45",
|
|
1978
|
+
"selection:bg-on-primary selection:text-primary",
|
|
1979
|
+
"focus-visible:border-on-primary focus-visible:ring-on-primary/40"
|
|
1980
|
+
].join(" ")
|
|
1981
|
+
},
|
|
1964
1982
|
size: {
|
|
1965
1983
|
sm: "h-8 px-3 py-1 text-xs file:h-6 file:text-xs",
|
|
1966
1984
|
md: "h-10 px-3 py-1 text-sm file:h-7 file:text-sm",
|
|
@@ -1968,6 +1986,7 @@ var inputVariants = cva5(
|
|
|
1968
1986
|
}
|
|
1969
1987
|
},
|
|
1970
1988
|
defaultVariants: {
|
|
1989
|
+
variant: "default",
|
|
1971
1990
|
size: "md"
|
|
1972
1991
|
}
|
|
1973
1992
|
}
|
|
@@ -1976,10 +1995,12 @@ function Input(_a) {
|
|
|
1976
1995
|
var _b = _a, {
|
|
1977
1996
|
className,
|
|
1978
1997
|
type,
|
|
1998
|
+
variant = "default",
|
|
1979
1999
|
size = "md"
|
|
1980
2000
|
} = _b, props = __objRest(_b, [
|
|
1981
2001
|
"className",
|
|
1982
2002
|
"type",
|
|
2003
|
+
"variant",
|
|
1983
2004
|
"size"
|
|
1984
2005
|
]);
|
|
1985
2006
|
return /* @__PURE__ */ jsx18(
|
|
@@ -1987,8 +2008,9 @@ function Input(_a) {
|
|
|
1987
2008
|
__spreadValues({
|
|
1988
2009
|
type,
|
|
1989
2010
|
"data-slot": "input",
|
|
2011
|
+
"data-variant": variant,
|
|
1990
2012
|
"data-size": size,
|
|
1991
|
-
className: cn(inputVariants({ size }), className)
|
|
2013
|
+
className: cn(inputVariants({ variant, size }), className)
|
|
1992
2014
|
}, props)
|
|
1993
2015
|
);
|
|
1994
2016
|
}
|
|
@@ -2012,24 +2034,36 @@ function Textarea(_a) {
|
|
|
2012
2034
|
// components/ui/input-group.tsx
|
|
2013
2035
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2014
2036
|
var InputGroupSizeContext = React6.createContext("md");
|
|
2037
|
+
var InputGroupVariantContext = React6.createContext("default");
|
|
2015
2038
|
var inputGroupVariants = cva6(
|
|
2016
2039
|
[
|
|
2017
|
-
"group/input-group relative flex w-full items-center rounded-
|
|
2018
|
-
"
|
|
2019
|
-
// Reduce input padding on the
|
|
2040
|
+
"group/input-group relative flex w-full items-center rounded-xs border",
|
|
2041
|
+
"transition-[color,box-shadow] outline-none min-w-0 has-[>textarea]:h-auto",
|
|
2042
|
+
// Reduce input padding only on the side an addon is attached to; the
|
|
2043
|
+
// opposite side keeps the natural Input padding (pl-3 / pr-3 = 12 px).
|
|
2020
2044
|
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
2021
|
-
"has-[>[data-align=inline-start]]:[&>input]:pr-2",
|
|
2022
2045
|
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
2023
|
-
"has-[>[data-align=inline-end]]:[&>input]:pl-2",
|
|
2024
2046
|
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
2025
2047
|
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
2026
|
-
// Focus
|
|
2027
|
-
"has-[[data-slot=input-group-control]:focus-visible]:
|
|
2048
|
+
// Focus ring (size; colour comes from the variant).
|
|
2049
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
2028
2050
|
// Error state.
|
|
2029
2051
|
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20"
|
|
2030
2052
|
].join(" "),
|
|
2031
2053
|
{
|
|
2032
2054
|
variants: {
|
|
2055
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
2056
|
+
// dark-fill treatment for coloured surfaces (mirrors `Input`).
|
|
2057
|
+
variant: {
|
|
2058
|
+
default: [
|
|
2059
|
+
"border-border-subtle bg-white/5",
|
|
2060
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-primary/[0.08]"
|
|
2061
|
+
].join(" "),
|
|
2062
|
+
inverse: [
|
|
2063
|
+
"border-on-primary/25 bg-input-inverse-surface",
|
|
2064
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-on-primary has-[[data-slot=input-group-control]:focus-visible]:ring-on-primary/40"
|
|
2065
|
+
].join(" ")
|
|
2066
|
+
},
|
|
2033
2067
|
size: {
|
|
2034
2068
|
sm: "h-8",
|
|
2035
2069
|
md: "h-10",
|
|
@@ -2037,6 +2071,7 @@ var inputGroupVariants = cva6(
|
|
|
2037
2071
|
}
|
|
2038
2072
|
},
|
|
2039
2073
|
defaultVariants: {
|
|
2074
|
+
variant: "default",
|
|
2040
2075
|
size: "md"
|
|
2041
2076
|
}
|
|
2042
2077
|
}
|
|
@@ -2044,24 +2079,35 @@ var inputGroupVariants = cva6(
|
|
|
2044
2079
|
function InputGroup(_a) {
|
|
2045
2080
|
var _b = _a, {
|
|
2046
2081
|
className,
|
|
2082
|
+
variant = "default",
|
|
2047
2083
|
size = "md"
|
|
2048
2084
|
} = _b, props = __objRest(_b, [
|
|
2049
2085
|
"className",
|
|
2086
|
+
"variant",
|
|
2050
2087
|
"size"
|
|
2051
2088
|
]);
|
|
2052
|
-
return /* @__PURE__ */ jsx20(
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2089
|
+
return /* @__PURE__ */ jsx20(
|
|
2090
|
+
InputGroupVariantContext.Provider,
|
|
2091
|
+
{
|
|
2092
|
+
value: variant,
|
|
2093
|
+
children: /* @__PURE__ */ jsx20(InputGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx20(
|
|
2094
|
+
"div",
|
|
2095
|
+
__spreadValues({
|
|
2096
|
+
"data-slot": "input-group",
|
|
2097
|
+
"data-variant": variant,
|
|
2098
|
+
"data-size": size,
|
|
2099
|
+
role: "group",
|
|
2100
|
+
className: cn(inputGroupVariants({ variant, size }), className)
|
|
2101
|
+
}, props)
|
|
2102
|
+
) })
|
|
2103
|
+
}
|
|
2104
|
+
);
|
|
2061
2105
|
}
|
|
2062
2106
|
var inputGroupAddonVariants = cva6(
|
|
2063
2107
|
[
|
|
2064
2108
|
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 font-medium text-on-subtle select-none",
|
|
2109
|
+
// Swap addon text/icon colour when inside an inverse group.
|
|
2110
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2065
2111
|
"group-data-[disabled=true]/input-group:opacity-50",
|
|
2066
2112
|
"[&>kbd]:rounded-[calc(var(--radius)-5px)]",
|
|
2067
2113
|
// Size-responsive text and icon sizing.
|
|
@@ -2156,6 +2202,8 @@ function InputGroupText(_a) {
|
|
|
2156
2202
|
__spreadValues({
|
|
2157
2203
|
className: cn(
|
|
2158
2204
|
"flex items-center gap-2 text-on-subtle",
|
|
2205
|
+
// Swap text/icon colour when inside an inverse group.
|
|
2206
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2159
2207
|
"group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg:not([class*='size-'])]:size-3.5",
|
|
2160
2208
|
"group-data-[size=md]/input-group:text-sm group-data-[size=md]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
2161
2209
|
"group-data-[size=lg]/input-group:text-sm group-data-[size=lg]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -2168,18 +2216,23 @@ function InputGroupText(_a) {
|
|
|
2168
2216
|
function InputGroupInput(_a) {
|
|
2169
2217
|
var _b = _a, {
|
|
2170
2218
|
className,
|
|
2171
|
-
size: sizeProp
|
|
2219
|
+
size: sizeProp,
|
|
2220
|
+
variant: variantProp
|
|
2172
2221
|
} = _b, props = __objRest(_b, [
|
|
2173
2222
|
"className",
|
|
2174
|
-
"size"
|
|
2223
|
+
"size",
|
|
2224
|
+
"variant"
|
|
2175
2225
|
]);
|
|
2176
2226
|
const groupSize = React6.useContext(InputGroupSizeContext);
|
|
2227
|
+
const groupVariant = React6.useContext(InputGroupVariantContext);
|
|
2177
2228
|
const size = sizeProp != null ? sizeProp : groupSize;
|
|
2229
|
+
const variant = variantProp != null ? variantProp : groupVariant;
|
|
2178
2230
|
return /* @__PURE__ */ jsx20(
|
|
2179
2231
|
Input,
|
|
2180
2232
|
__spreadValues({
|
|
2181
2233
|
"data-slot": "input-group-control",
|
|
2182
2234
|
size,
|
|
2235
|
+
variant,
|
|
2183
2236
|
className: cn(
|
|
2184
2237
|
"h-full flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0",
|
|
2185
2238
|
className
|
|
@@ -4089,8 +4142,8 @@ var itemMediaVariants = cva9(
|
|
|
4089
4142
|
variants: {
|
|
4090
4143
|
variant: {
|
|
4091
4144
|
default: "bg-transparent",
|
|
4092
|
-
icon: "size-8 rounded-
|
|
4093
|
-
image: "size-10 overflow-hidden rounded-
|
|
4145
|
+
icon: "size-8 rounded-full border bg-subtle [&_svg:not([class*='size-'])]:size-4",
|
|
4146
|
+
image: "size-10 overflow-hidden rounded-full [&_img]:size-full [&_img]:object-cover"
|
|
4094
4147
|
}
|
|
4095
4148
|
},
|
|
4096
4149
|
defaultVariants: {
|
|
@@ -5187,7 +5240,7 @@ function SelectTrigger(_a) {
|
|
|
5187
5240
|
"data-readonly": readOnly ? "" : void 0,
|
|
5188
5241
|
disabled: readOnly || props.disabled,
|
|
5189
5242
|
className: cn(
|
|
5190
|
-
"flex w-fit items-center justify-between gap-2 rounded-
|
|
5243
|
+
"flex w-fit items-center justify-between gap-2 rounded-xs border border-input bg-prominent appearance-none whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-on-subtle data-[size=sm]:h-8 data-[size=sm]:px-3 data-[size=sm]:py-1 data-[size=sm]:text-xs data-[size=md]:h-10 data-[size=md]:px-3 data-[size=md]:py-1 data-[size=md]:text-sm data-[size=lg]:h-12 data-[size=lg]:px-4 data-[size=lg]:py-2 data-[size=lg]:text-base *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-on-subtle data-[readonly]:cursor-default data-[readonly]:opacity-100",
|
|
5191
5244
|
className
|
|
5192
5245
|
)
|
|
5193
5246
|
}, props), {
|
|
@@ -7504,7 +7557,6 @@ function NavBarBlock({ brand, links, signIn, signUp }) {
|
|
|
7504
7557
|
}
|
|
7505
7558
|
|
|
7506
7559
|
// components/blocks/open-positions-block.tsx
|
|
7507
|
-
import * as React18 from "react";
|
|
7508
7560
|
import { History as History2, X as X4 } from "lucide-react";
|
|
7509
7561
|
import { jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7510
7562
|
function OpenPositionsBlock({
|
|
@@ -7546,10 +7598,7 @@ function PositionsList({
|
|
|
7546
7598
|
onViewHistory
|
|
7547
7599
|
}) {
|
|
7548
7600
|
return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
7549
|
-
/* @__PURE__ */ jsx68(ItemGroup, { className: "min-h-0 overflow-y-auto", children: positions.map((pos, i) => /* @__PURE__ */
|
|
7550
|
-
/* @__PURE__ */ jsx68(PositionRow, { position: pos }),
|
|
7551
|
-
i < positions.length - 1 && /* @__PURE__ */ jsx68("div", { className: "h-px mx-4 bg-border-subtle" })
|
|
7552
|
-
] }, i)) }),
|
|
7601
|
+
/* @__PURE__ */ jsx68(ItemGroup, { className: "min-h-0 overflow-y-auto", children: positions.map((pos, i) => /* @__PURE__ */ jsx68(PositionRow, { position: pos }, i)) }),
|
|
7553
7602
|
/* @__PURE__ */ jsx68(Separator, {}),
|
|
7554
7603
|
/* @__PURE__ */ jsx68("div", { className: "shrink-0 flex justify-center py-4", children: /* @__PURE__ */ jsx68(Button, { variant: "tertiary", size: "md", onClick: onViewHistory, children: "View trade history" }) })
|
|
7555
7604
|
] });
|