@trading-game/design-intelligence-layer 0.17.2 → 0.17.3
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 +14 -2
- package/dist/index.cjs +83 -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 +83 -35
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +3 -2
- package/package.json +1 -1
- 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-primary hover:bg-primary/[0.08]"
|
|
187
|
+
tertiary: "bg-transparent text-primary hover:bg-primary/[0.08]",
|
|
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,31 @@ 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
|
-
"focus-visible:
|
|
1959
|
+
"focus-visible:ring-[3px]"
|
|
1961
1960
|
].join(" "),
|
|
1962
1961
|
{
|
|
1963
1962
|
variants: {
|
|
1963
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
1964
|
+
// dark-fill treatment for coloured surfaces (e.g. bg-primary).
|
|
1965
|
+
variant: {
|
|
1966
|
+
default: [
|
|
1967
|
+
"border-border-subtle bg-white/5 text-on-prominent",
|
|
1968
|
+
"file:text-on-prominent",
|
|
1969
|
+
"placeholder:text-on-subtle",
|
|
1970
|
+
"selection:bg-primary selection:text-on-primary",
|
|
1971
|
+
"focus-visible:border-primary focus-visible:ring-primary/[0.08]"
|
|
1972
|
+
].join(" "),
|
|
1973
|
+
inverse: [
|
|
1974
|
+
"border-on-primary/25 bg-input-inverse-surface text-on-primary",
|
|
1975
|
+
"file:text-on-primary",
|
|
1976
|
+
"placeholder:text-on-primary/45",
|
|
1977
|
+
"selection:bg-on-primary selection:text-primary",
|
|
1978
|
+
"focus-visible:border-on-primary focus-visible:ring-on-primary/40"
|
|
1979
|
+
].join(" ")
|
|
1980
|
+
},
|
|
1964
1981
|
size: {
|
|
1965
1982
|
sm: "h-8 px-3 py-1 text-xs file:h-6 file:text-xs",
|
|
1966
1983
|
md: "h-10 px-3 py-1 text-sm file:h-7 file:text-sm",
|
|
@@ -1968,6 +1985,7 @@ var inputVariants = cva5(
|
|
|
1968
1985
|
}
|
|
1969
1986
|
},
|
|
1970
1987
|
defaultVariants: {
|
|
1988
|
+
variant: "default",
|
|
1971
1989
|
size: "md"
|
|
1972
1990
|
}
|
|
1973
1991
|
}
|
|
@@ -1976,10 +1994,12 @@ function Input(_a) {
|
|
|
1976
1994
|
var _b = _a, {
|
|
1977
1995
|
className,
|
|
1978
1996
|
type,
|
|
1997
|
+
variant = "default",
|
|
1979
1998
|
size = "md"
|
|
1980
1999
|
} = _b, props = __objRest(_b, [
|
|
1981
2000
|
"className",
|
|
1982
2001
|
"type",
|
|
2002
|
+
"variant",
|
|
1983
2003
|
"size"
|
|
1984
2004
|
]);
|
|
1985
2005
|
return /* @__PURE__ */ jsx18(
|
|
@@ -1987,8 +2007,9 @@ function Input(_a) {
|
|
|
1987
2007
|
__spreadValues({
|
|
1988
2008
|
type,
|
|
1989
2009
|
"data-slot": "input",
|
|
2010
|
+
"data-variant": variant,
|
|
1990
2011
|
"data-size": size,
|
|
1991
|
-
className: cn(inputVariants({ size }), className)
|
|
2012
|
+
className: cn(inputVariants({ variant, size }), className)
|
|
1992
2013
|
}, props)
|
|
1993
2014
|
);
|
|
1994
2015
|
}
|
|
@@ -2012,24 +2033,36 @@ function Textarea(_a) {
|
|
|
2012
2033
|
// components/ui/input-group.tsx
|
|
2013
2034
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2014
2035
|
var InputGroupSizeContext = React6.createContext("md");
|
|
2036
|
+
var InputGroupVariantContext = React6.createContext("default");
|
|
2015
2037
|
var inputGroupVariants = cva6(
|
|
2016
2038
|
[
|
|
2017
|
-
"group/input-group relative flex w-full items-center rounded-
|
|
2018
|
-
"
|
|
2019
|
-
// Reduce input padding on the
|
|
2039
|
+
"group/input-group relative flex w-full items-center rounded-xs border",
|
|
2040
|
+
"transition-[color,box-shadow] outline-none min-w-0 has-[>textarea]:h-auto",
|
|
2041
|
+
// Reduce input padding only on the side an addon is attached to; the
|
|
2042
|
+
// opposite side keeps the natural Input padding (pl-3 / pr-3 = 12 px).
|
|
2020
2043
|
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
2021
|
-
"has-[>[data-align=inline-start]]:[&>input]:pr-2",
|
|
2022
2044
|
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
2023
|
-
"has-[>[data-align=inline-end]]:[&>input]:pl-2",
|
|
2024
2045
|
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
2025
2046
|
"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]:
|
|
2047
|
+
// Focus ring (size; colour comes from the variant).
|
|
2048
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
2028
2049
|
// Error state.
|
|
2029
2050
|
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20"
|
|
2030
2051
|
].join(" "),
|
|
2031
2052
|
{
|
|
2032
2053
|
variants: {
|
|
2054
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
2055
|
+
// dark-fill treatment for coloured surfaces (mirrors `Input`).
|
|
2056
|
+
variant: {
|
|
2057
|
+
default: [
|
|
2058
|
+
"border-border-subtle bg-white/5",
|
|
2059
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-primary/[0.08]"
|
|
2060
|
+
].join(" "),
|
|
2061
|
+
inverse: [
|
|
2062
|
+
"border-on-primary/25 bg-input-inverse-surface",
|
|
2063
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-on-primary has-[[data-slot=input-group-control]:focus-visible]:ring-on-primary/40"
|
|
2064
|
+
].join(" ")
|
|
2065
|
+
},
|
|
2033
2066
|
size: {
|
|
2034
2067
|
sm: "h-8",
|
|
2035
2068
|
md: "h-10",
|
|
@@ -2037,6 +2070,7 @@ var inputGroupVariants = cva6(
|
|
|
2037
2070
|
}
|
|
2038
2071
|
},
|
|
2039
2072
|
defaultVariants: {
|
|
2073
|
+
variant: "default",
|
|
2040
2074
|
size: "md"
|
|
2041
2075
|
}
|
|
2042
2076
|
}
|
|
@@ -2044,24 +2078,35 @@ var inputGroupVariants = cva6(
|
|
|
2044
2078
|
function InputGroup(_a) {
|
|
2045
2079
|
var _b = _a, {
|
|
2046
2080
|
className,
|
|
2081
|
+
variant = "default",
|
|
2047
2082
|
size = "md"
|
|
2048
2083
|
} = _b, props = __objRest(_b, [
|
|
2049
2084
|
"className",
|
|
2085
|
+
"variant",
|
|
2050
2086
|
"size"
|
|
2051
2087
|
]);
|
|
2052
|
-
return /* @__PURE__ */ jsx20(
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2088
|
+
return /* @__PURE__ */ jsx20(
|
|
2089
|
+
InputGroupVariantContext.Provider,
|
|
2090
|
+
{
|
|
2091
|
+
value: variant,
|
|
2092
|
+
children: /* @__PURE__ */ jsx20(InputGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx20(
|
|
2093
|
+
"div",
|
|
2094
|
+
__spreadValues({
|
|
2095
|
+
"data-slot": "input-group",
|
|
2096
|
+
"data-variant": variant,
|
|
2097
|
+
"data-size": size,
|
|
2098
|
+
role: "group",
|
|
2099
|
+
className: cn(inputGroupVariants({ variant, size }), className)
|
|
2100
|
+
}, props)
|
|
2101
|
+
) })
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2061
2104
|
}
|
|
2062
2105
|
var inputGroupAddonVariants = cva6(
|
|
2063
2106
|
[
|
|
2064
2107
|
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 font-medium text-on-subtle select-none",
|
|
2108
|
+
// Swap addon text/icon colour when inside an inverse group.
|
|
2109
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2065
2110
|
"group-data-[disabled=true]/input-group:opacity-50",
|
|
2066
2111
|
"[&>kbd]:rounded-[calc(var(--radius)-5px)]",
|
|
2067
2112
|
// Size-responsive text and icon sizing.
|
|
@@ -2156,6 +2201,8 @@ function InputGroupText(_a) {
|
|
|
2156
2201
|
__spreadValues({
|
|
2157
2202
|
className: cn(
|
|
2158
2203
|
"flex items-center gap-2 text-on-subtle",
|
|
2204
|
+
// Swap text/icon colour when inside an inverse group.
|
|
2205
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2159
2206
|
"group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg:not([class*='size-'])]:size-3.5",
|
|
2160
2207
|
"group-data-[size=md]/input-group:text-sm group-data-[size=md]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
2161
2208
|
"group-data-[size=lg]/input-group:text-sm group-data-[size=lg]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -2168,18 +2215,23 @@ function InputGroupText(_a) {
|
|
|
2168
2215
|
function InputGroupInput(_a) {
|
|
2169
2216
|
var _b = _a, {
|
|
2170
2217
|
className,
|
|
2171
|
-
size: sizeProp
|
|
2218
|
+
size: sizeProp,
|
|
2219
|
+
variant: variantProp
|
|
2172
2220
|
} = _b, props = __objRest(_b, [
|
|
2173
2221
|
"className",
|
|
2174
|
-
"size"
|
|
2222
|
+
"size",
|
|
2223
|
+
"variant"
|
|
2175
2224
|
]);
|
|
2176
2225
|
const groupSize = React6.useContext(InputGroupSizeContext);
|
|
2226
|
+
const groupVariant = React6.useContext(InputGroupVariantContext);
|
|
2177
2227
|
const size = sizeProp != null ? sizeProp : groupSize;
|
|
2228
|
+
const variant = variantProp != null ? variantProp : groupVariant;
|
|
2178
2229
|
return /* @__PURE__ */ jsx20(
|
|
2179
2230
|
Input,
|
|
2180
2231
|
__spreadValues({
|
|
2181
2232
|
"data-slot": "input-group-control",
|
|
2182
2233
|
size,
|
|
2234
|
+
variant,
|
|
2183
2235
|
className: cn(
|
|
2184
2236
|
"h-full flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0",
|
|
2185
2237
|
className
|
|
@@ -4089,8 +4141,8 @@ var itemMediaVariants = cva9(
|
|
|
4089
4141
|
variants: {
|
|
4090
4142
|
variant: {
|
|
4091
4143
|
default: "bg-transparent",
|
|
4092
|
-
icon: "size-8 rounded-
|
|
4093
|
-
image: "size-10 overflow-hidden rounded-
|
|
4144
|
+
icon: "size-8 rounded-full border bg-subtle [&_svg:not([class*='size-'])]:size-4",
|
|
4145
|
+
image: "size-10 overflow-hidden rounded-full [&_img]:size-full [&_img]:object-cover"
|
|
4094
4146
|
}
|
|
4095
4147
|
},
|
|
4096
4148
|
defaultVariants: {
|
|
@@ -5187,7 +5239,7 @@ function SelectTrigger(_a) {
|
|
|
5187
5239
|
"data-readonly": readOnly ? "" : void 0,
|
|
5188
5240
|
disabled: readOnly || props.disabled,
|
|
5189
5241
|
className: cn(
|
|
5190
|
-
"flex w-fit items-center justify-between gap-2 rounded-
|
|
5242
|
+
"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
5243
|
className
|
|
5192
5244
|
)
|
|
5193
5245
|
}, props), {
|
|
@@ -7504,7 +7556,6 @@ function NavBarBlock({ brand, links, signIn, signUp }) {
|
|
|
7504
7556
|
}
|
|
7505
7557
|
|
|
7506
7558
|
// components/blocks/open-positions-block.tsx
|
|
7507
|
-
import * as React18 from "react";
|
|
7508
7559
|
import { History as History2, X as X4 } from "lucide-react";
|
|
7509
7560
|
import { jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7510
7561
|
function OpenPositionsBlock({
|
|
@@ -7546,10 +7597,7 @@ function PositionsList({
|
|
|
7546
7597
|
onViewHistory
|
|
7547
7598
|
}) {
|
|
7548
7599
|
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)) }),
|
|
7600
|
+
/* @__PURE__ */ jsx68(ItemGroup, { className: "min-h-0 overflow-y-auto", children: positions.map((pos, i) => /* @__PURE__ */ jsx68(PositionRow, { position: pos }, i)) }),
|
|
7553
7601
|
/* @__PURE__ */ jsx68(Separator, {}),
|
|
7554
7602
|
/* @__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
7603
|
] });
|