@luxfi/ui 7.4.11 → 7.4.13

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.
Files changed (84) hide show
  1. package/dist/alert.cjs +68 -46
  2. package/dist/alert.js +69 -46
  3. package/dist/avatar.cjs +49 -47
  4. package/dist/avatar.js +52 -49
  5. package/dist/badge.cjs +82 -49
  6. package/dist/badge.js +83 -50
  7. package/dist/checkbox.cjs +42 -75
  8. package/dist/checkbox.js +43 -76
  9. package/dist/chrome.cjs +3 -7
  10. package/dist/chrome.js +3 -7
  11. package/dist/close-button.cjs +3 -7
  12. package/dist/close-button.js +3 -7
  13. package/dist/dialog.cjs +3 -7
  14. package/dist/dialog.js +3 -7
  15. package/dist/drawer.cjs +3 -7
  16. package/dist/drawer.js +3 -7
  17. package/dist/empty-state.cjs +13 -13
  18. package/dist/empty-state.js +13 -13
  19. package/dist/expiration-selector.cjs +58 -63
  20. package/dist/expiration-selector.js +58 -63
  21. package/dist/greeks-display.cjs +48 -39
  22. package/dist/greeks-display.js +48 -39
  23. package/dist/index.cjs +1053 -888
  24. package/dist/index.js +1054 -889
  25. package/dist/input-group.cjs +36 -19
  26. package/dist/input-group.js +37 -19
  27. package/dist/option-chain.cjs +89 -67
  28. package/dist/option-chain.js +89 -67
  29. package/dist/option-position.cjs +88 -85
  30. package/dist/option-position.js +88 -85
  31. package/dist/pin-input.cjs +30 -29
  32. package/dist/pin-input.js +30 -29
  33. package/dist/pnl-diagram.cjs +20 -20
  34. package/dist/pnl-diagram.js +20 -20
  35. package/dist/popover.cjs +3 -7
  36. package/dist/popover.js +3 -7
  37. package/dist/progress-circle.cjs +40 -22
  38. package/dist/progress-circle.d.cts +5 -5
  39. package/dist/progress-circle.d.ts +5 -5
  40. package/dist/progress-circle.js +41 -22
  41. package/dist/progress.cjs +15 -22
  42. package/dist/progress.d.cts +6 -6
  43. package/dist/progress.d.ts +6 -6
  44. package/dist/progress.js +15 -22
  45. package/dist/radio.cjs +35 -68
  46. package/dist/radio.d.cts +18 -18
  47. package/dist/radio.d.ts +18 -18
  48. package/dist/radio.js +36 -69
  49. package/dist/rating.cjs +15 -17
  50. package/dist/rating.js +15 -17
  51. package/dist/slider.cjs +33 -50
  52. package/dist/slider.js +34 -51
  53. package/dist/strategy-builder.cjs +194 -115
  54. package/dist/strategy-builder.js +194 -115
  55. package/dist/switch.cjs +48 -55
  56. package/dist/switch.js +49 -56
  57. package/dist/tag.cjs +115 -69
  58. package/dist/tag.js +116 -69
  59. package/dist/tooltip.cjs +28 -17
  60. package/dist/tooltip.js +30 -18
  61. package/package.json +1 -1
  62. package/src/alert.tsx +78 -45
  63. package/src/avatar.tsx +54 -38
  64. package/src/badge.tsx +65 -44
  65. package/src/checkbox.tsx +70 -89
  66. package/src/close-button.tsx +3 -8
  67. package/src/empty-state.tsx +21 -17
  68. package/src/expiration-selector.tsx +84 -66
  69. package/src/greeks-display.tsx +59 -51
  70. package/src/input-group.tsx +38 -24
  71. package/src/option-chain.tsx +154 -104
  72. package/src/option-position.tsx +143 -114
  73. package/src/pin-input.tsx +37 -29
  74. package/src/pnl-diagram.tsx +36 -28
  75. package/src/progress-circle.tsx +52 -28
  76. package/src/progress.tsx +17 -21
  77. package/src/radio.tsx +56 -76
  78. package/src/rating.tsx +22 -20
  79. package/src/slider.tsx +43 -45
  80. package/src/strategy-builder.tsx +260 -162
  81. package/src/switch.tsx +63 -64
  82. package/src/tag.tsx +89 -51
  83. package/src/tooltip.tsx +21 -13
  84. package/tokens.css +18 -0
@@ -1,18 +1,15 @@
1
1
  "use client";
2
+ import { XStack, YStack, Text } from '@hanzo/gui';
2
3
  import * as React from 'react';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
4
  import { jsx, jsxs } from 'react/jsx-runtime';
6
5
 
7
6
  // src/empty-state.tsx
8
- function cn(...inputs) {
9
- return twMerge(clsx(inputs));
10
- }
11
7
  var apos = "\u2019";
12
8
  function upperFirst(str) {
13
9
  return str.charAt(0).toUpperCase() + str.slice(1);
14
10
  }
15
11
  var ICONS = {};
12
+ var MUTED = "var(--color-text-secondary)";
16
13
  var EmptyState = React.forwardRef(
17
14
  function EmptyState2(props, ref) {
18
15
  const { title, description, term, type = "query", icon, children, className, ...rest } = props;
@@ -50,17 +47,20 @@ var EmptyState = React.forwardRef(
50
47
  return icon;
51
48
  })();
52
49
  return /* @__PURE__ */ jsx(
53
- "div",
50
+ XStack,
54
51
  {
55
52
  ref,
56
- className: cn("flex items-center justify-center py-10", className),
53
+ alignItems: "center",
54
+ justifyContent: "center",
55
+ paddingVertical: 40,
56
+ className,
57
57
  ...rest,
58
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5", children: [
59
- iconContent && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: iconContent }),
60
- descriptionContent ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
61
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
62
- /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary", children: descriptionContent })
63
- ] }) : /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
58
+ children: /* @__PURE__ */ jsxs(YStack, { alignItems: "center", gap: 20, children: [
59
+ iconContent && /* @__PURE__ */ jsx(XStack, { alignItems: "center", justifyContent: "center", children: iconContent }),
60
+ descriptionContent ? /* @__PURE__ */ jsxs(YStack, { alignItems: "center", gap: 8, children: [
61
+ /* @__PURE__ */ jsx(Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
62
+ /* @__PURE__ */ jsx(Text, { fontSize: 14, textAlign: "center", color: MUTED, children: descriptionContent })
63
+ ] }) : /* @__PURE__ */ jsx(Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
64
64
  children
65
65
  ] })
66
66
  }
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var gui = require('@hanzo/gui');
4
5
  var React = require('react');
5
- var clsx = require('clsx');
6
- var tailwindMerge = require('tailwind-merge');
7
6
  var jsxRuntime = require('react/jsx-runtime');
8
7
 
9
8
  function _interopNamespace(e) {
@@ -26,9 +25,6 @@ function _interopNamespace(e) {
26
25
 
27
26
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
27
 
29
- function cn(...inputs) {
30
- return tailwindMerge.twMerge(clsx.clsx(inputs));
31
- }
32
28
  function formatExpDate(date) {
33
29
  const d = new Date(date);
34
30
  return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
@@ -39,28 +35,53 @@ var GROUP_LABELS = {
39
35
  monthly: "Monthly",
40
36
  quarterly: "Quarterly"
41
37
  };
38
+ var SHAPE = {
39
+ selected: {
40
+ borderColor: "transparent",
41
+ backgroundColor: "var(--color-selected-control-bg)",
42
+ color: "var(--color-selected-control-text)"
43
+ },
44
+ resting: {
45
+ borderColor: "var(--color-border-divider)",
46
+ backgroundColor: "var(--card)",
47
+ color: "var(--color-text-secondary)",
48
+ hoverStyle: { borderColor: "var(--color-hover)", color: "var(--color-hover)" }
49
+ }
50
+ };
42
51
  function ExpirationPill({ exp, isSelected, onClick }) {
52
+ const shape = isSelected ? SHAPE.selected : SHAPE.resting;
53
+ const dteColor = exp.dte <= 7 && !isSelected ? "var(--color-status-warn)" : isSelected ? "var(--color-selected-control-text)" : "var(--muted-foreground)";
43
54
  return /* @__PURE__ */ jsxRuntime.jsxs(
44
- "button",
55
+ gui.YStack,
45
56
  {
46
- type: "button",
57
+ unstyled: true,
58
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
47
59
  onClick,
48
- className: cn(
49
- "flex flex-col items-center gap-0.5 rounded-md px-3 py-1.5 transition-colors shrink-0",
50
- "border text-xs",
51
- isSelected ? "border-blue-500/60 bg-blue-900/30 text-blue-300" : "border-zinc-800 bg-zinc-900/50 text-zinc-400 hover:border-zinc-600 hover:text-zinc-200"
52
- ),
60
+ alignItems: "center",
61
+ gap: 2,
62
+ borderRadius: 6,
63
+ paddingHorizontal: 12,
64
+ paddingVertical: 6,
65
+ flexShrink: 0,
66
+ borderWidth: 1,
67
+ borderStyle: "solid",
68
+ cursor: "pointer",
69
+ ...shape,
53
70
  children: [
54
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium whitespace-nowrap", children: formatExpDate(exp.date) }),
55
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
56
- "font-mono tabular-nums text-[10px]",
57
- isSelected ? "text-[var(--foreground)]" : "text-[var(--muted-foreground)]",
58
- // Near expiry is a notice, and a notice in Lux is the loudest neutral.
59
- exp.dte <= 7 && !isSelected && "text-[var(--color-status-warn)]"
60
- ), children: [
61
- exp.dte,
62
- "d"
63
- ] })
71
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { unstyled: true, fontSize: 12, fontWeight: "500", style: { whiteSpace: "nowrap" }, children: formatExpDate(exp.date) }),
72
+ /* @__PURE__ */ jsxRuntime.jsxs(
73
+ gui.Text,
74
+ {
75
+ fontVariant: ["tabular-nums"],
76
+ style: { fontFamily: "monospace" },
77
+ fontSize: 10,
78
+ color: dteColor,
79
+ children: [
80
+ exp.dte,
81
+ "d"
82
+ ]
83
+ }
84
+ )
64
85
  ]
65
86
  }
66
87
  );
@@ -90,49 +111,23 @@ var ExpirationSelector = React__namespace.forwardRef(
90
111
  label: GROUP_LABELS[type],
91
112
  items: expirations.filter((e) => e.type === type)
92
113
  })).filter((g) => g.items.length > 0);
93
- return /* @__PURE__ */ jsxRuntime.jsx(
94
- "div",
95
- {
96
- ref,
97
- className: cn("flex flex-col gap-2", className),
98
- ...rest,
99
- children: grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
100
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-zinc-600 px-1", children: group.label }),
101
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 overflow-x-auto no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
102
- ExpirationPill,
103
- {
104
- exp,
105
- isSelected: exp.date === selected,
106
- onClick: () => onSelect(exp.date)
107
- }
108
- ) }, exp.date)) })
109
- ] }, group.type))
110
- }
111
- );
112
- }
113
- return /* @__PURE__ */ jsxRuntime.jsx(
114
- "div",
115
- {
116
- ref,
117
- className: cn("flex items-center gap-1", className),
118
- ...rest,
119
- children: /* @__PURE__ */ jsxRuntime.jsx(
120
- "div",
114
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { ref, gap: 8, className, ...rest, children: grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: 4, children: [
115
+ /* @__PURE__ */ jsxRuntime.jsx(
116
+ gui.Text,
121
117
  {
122
- ref: scrollRef,
123
- className: "flex gap-1.5 overflow-x-auto no-scrollbar",
124
- children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
125
- ExpirationPill,
126
- {
127
- exp,
128
- isSelected: exp.date === selected,
129
- onClick: () => onSelect(exp.date)
130
- }
131
- ) }, exp.date))
118
+ fontSize: 10,
119
+ fontWeight: "600",
120
+ textTransform: "uppercase",
121
+ letterSpacing: 0.5,
122
+ paddingHorizontal: 4,
123
+ color: "var(--color-text-secondary)",
124
+ children: group.label
132
125
  }
133
- )
134
- }
135
- );
126
+ ),
127
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) })
128
+ ] }, group.type)) });
129
+ }
130
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ref, alignItems: "center", gap: 4, className, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ref: scrollRef, gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) }) });
136
131
  }
137
132
  );
138
133
 
@@ -1,12 +1,8 @@
1
1
  "use client";
2
+ import { YStack, Text, XStack } from '@hanzo/gui';
2
3
  import * as React from 'react';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
4
  import { jsx, jsxs } from 'react/jsx-runtime';
6
5
 
7
- function cn(...inputs) {
8
- return twMerge(clsx(inputs));
9
- }
10
6
  function formatExpDate(date) {
11
7
  const d = new Date(date);
12
8
  return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
@@ -17,28 +13,53 @@ var GROUP_LABELS = {
17
13
  monthly: "Monthly",
18
14
  quarterly: "Quarterly"
19
15
  };
16
+ var SHAPE = {
17
+ selected: {
18
+ borderColor: "transparent",
19
+ backgroundColor: "var(--color-selected-control-bg)",
20
+ color: "var(--color-selected-control-text)"
21
+ },
22
+ resting: {
23
+ borderColor: "var(--color-border-divider)",
24
+ backgroundColor: "var(--card)",
25
+ color: "var(--color-text-secondary)",
26
+ hoverStyle: { borderColor: "var(--color-hover)", color: "var(--color-hover)" }
27
+ }
28
+ };
20
29
  function ExpirationPill({ exp, isSelected, onClick }) {
30
+ const shape = isSelected ? SHAPE.selected : SHAPE.resting;
31
+ const dteColor = exp.dte <= 7 && !isSelected ? "var(--color-status-warn)" : isSelected ? "var(--color-selected-control-text)" : "var(--muted-foreground)";
21
32
  return /* @__PURE__ */ jsxs(
22
- "button",
33
+ YStack,
23
34
  {
24
- type: "button",
35
+ unstyled: true,
36
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
25
37
  onClick,
26
- className: cn(
27
- "flex flex-col items-center gap-0.5 rounded-md px-3 py-1.5 transition-colors shrink-0",
28
- "border text-xs",
29
- isSelected ? "border-blue-500/60 bg-blue-900/30 text-blue-300" : "border-zinc-800 bg-zinc-900/50 text-zinc-400 hover:border-zinc-600 hover:text-zinc-200"
30
- ),
38
+ alignItems: "center",
39
+ gap: 2,
40
+ borderRadius: 6,
41
+ paddingHorizontal: 12,
42
+ paddingVertical: 6,
43
+ flexShrink: 0,
44
+ borderWidth: 1,
45
+ borderStyle: "solid",
46
+ cursor: "pointer",
47
+ ...shape,
31
48
  children: [
32
- /* @__PURE__ */ jsx("span", { className: "font-medium whitespace-nowrap", children: formatExpDate(exp.date) }),
33
- /* @__PURE__ */ jsxs("span", { className: cn(
34
- "font-mono tabular-nums text-[10px]",
35
- isSelected ? "text-[var(--foreground)]" : "text-[var(--muted-foreground)]",
36
- // Near expiry is a notice, and a notice in Lux is the loudest neutral.
37
- exp.dte <= 7 && !isSelected && "text-[var(--color-status-warn)]"
38
- ), children: [
39
- exp.dte,
40
- "d"
41
- ] })
49
+ /* @__PURE__ */ jsx(Text, { unstyled: true, fontSize: 12, fontWeight: "500", style: { whiteSpace: "nowrap" }, children: formatExpDate(exp.date) }),
50
+ /* @__PURE__ */ jsxs(
51
+ Text,
52
+ {
53
+ fontVariant: ["tabular-nums"],
54
+ style: { fontFamily: "monospace" },
55
+ fontSize: 10,
56
+ color: dteColor,
57
+ children: [
58
+ exp.dte,
59
+ "d"
60
+ ]
61
+ }
62
+ )
42
63
  ]
43
64
  }
44
65
  );
@@ -68,49 +89,23 @@ var ExpirationSelector = React.forwardRef(
68
89
  label: GROUP_LABELS[type],
69
90
  items: expirations.filter((e) => e.type === type)
70
91
  })).filter((g) => g.items.length > 0);
71
- return /* @__PURE__ */ jsx(
72
- "div",
73
- {
74
- ref,
75
- className: cn("flex flex-col gap-2", className),
76
- ...rest,
77
- children: grouped.map((group) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
78
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-zinc-600 px-1", children: group.label }),
79
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 overflow-x-auto no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(
80
- ExpirationPill,
81
- {
82
- exp,
83
- isSelected: exp.date === selected,
84
- onClick: () => onSelect(exp.date)
85
- }
86
- ) }, exp.date)) })
87
- ] }, group.type))
88
- }
89
- );
90
- }
91
- return /* @__PURE__ */ jsx(
92
- "div",
93
- {
94
- ref,
95
- className: cn("flex items-center gap-1", className),
96
- ...rest,
97
- children: /* @__PURE__ */ jsx(
98
- "div",
92
+ return /* @__PURE__ */ jsx(YStack, { ref, gap: 8, className, ...rest, children: grouped.map((group) => /* @__PURE__ */ jsxs(YStack, { gap: 4, children: [
93
+ /* @__PURE__ */ jsx(
94
+ Text,
99
95
  {
100
- ref: scrollRef,
101
- className: "flex gap-1.5 overflow-x-auto no-scrollbar",
102
- children: expirations.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(
103
- ExpirationPill,
104
- {
105
- exp,
106
- isSelected: exp.date === selected,
107
- onClick: () => onSelect(exp.date)
108
- }
109
- ) }, exp.date))
96
+ fontSize: 10,
97
+ fontWeight: "600",
98
+ textTransform: "uppercase",
99
+ letterSpacing: 0.5,
100
+ paddingHorizontal: 4,
101
+ color: "var(--color-text-secondary)",
102
+ children: group.label
110
103
  }
111
- )
112
- }
113
- );
104
+ ),
105
+ /* @__PURE__ */ jsx(XStack, { gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) })
106
+ ] }, group.type)) });
107
+ }
108
+ return /* @__PURE__ */ jsx(XStack, { ref, alignItems: "center", gap: 4, className, ...rest, children: /* @__PURE__ */ jsx(XStack, { ref: scrollRef, gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: expirations.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) }) });
114
109
  }
115
110
  );
116
111
 
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var gui = require('@hanzo/gui');
4
5
  var React = require('react');
5
- var clsx = require('clsx');
6
- var tailwindMerge = require('tailwind-merge');
7
6
  var jsxRuntime = require('react/jsx-runtime');
8
7
 
9
8
  function _interopNamespace(e) {
@@ -26,44 +25,55 @@ function _interopNamespace(e) {
26
25
 
27
26
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
27
 
29
- function cn(...inputs) {
30
- return tailwindMerge.twMerge(clsx.clsx(inputs));
31
- }
32
28
  var GREEKS = [
33
- { key: "delta", label: "Delta", symbol: "\u0394", color: "text-[var(--foreground)]", barColor: "bg-[var(--foreground)]", decimals: 4, maxMagnitude: 1 },
34
- { key: "gamma", label: "Gamma", symbol: "\u0393", color: "text-[var(--chart-1)]", barColor: "bg-[var(--chart-1)]", decimals: 4, maxMagnitude: 0.1 },
35
- { key: "theta", label: "Theta", symbol: "\u0398", color: "text-[var(--chart-4)]", barColor: "bg-[var(--chart-4)]", decimals: 4, maxMagnitude: 1 },
36
- { key: "vega", label: "Vega", symbol: "\u03BD", color: "text-[var(--chart-2)]", barColor: "bg-[var(--chart-2)]", decimals: 4, maxMagnitude: 1 },
37
- { key: "rho", label: "Rho", symbol: "\u03C1", color: "text-[var(--chart-3)]", barColor: "bg-[var(--chart-3)]", decimals: 4, maxMagnitude: 1 },
38
- { key: "iv", label: "IV", symbol: "\u03C3", color: "text-[var(--chart-5)]", barColor: "bg-[var(--chart-5)]", decimals: 1, maxMagnitude: 100 }
29
+ { key: "delta", label: "Delta", symbol: "\u0394", color: "var(--foreground)", barColor: "var(--foreground)", decimals: 4, maxMagnitude: 1 },
30
+ { key: "gamma", label: "Gamma", symbol: "\u0393", color: "var(--chart-1)", barColor: "var(--chart-1)", decimals: 4, maxMagnitude: 0.1 },
31
+ { key: "theta", label: "Theta", symbol: "\u0398", color: "var(--chart-4)", barColor: "var(--chart-4)", decimals: 4, maxMagnitude: 1 },
32
+ { key: "vega", label: "Vega", symbol: "\u03BD", color: "var(--chart-2)", barColor: "var(--chart-2)", decimals: 4, maxMagnitude: 1 },
33
+ { key: "rho", label: "Rho", symbol: "\u03C1", color: "var(--chart-3)", barColor: "var(--chart-3)", decimals: 4, maxMagnitude: 1 },
34
+ { key: "iv", label: "IV", symbol: "\u03C3", color: "var(--chart-5)", barColor: "var(--chart-5)", decimals: 1, maxMagnitude: 100 }
39
35
  ];
40
36
  function GreekItem({ def, value, compact }) {
41
37
  const magnitude = Math.min(Math.abs(value) / def.maxMagnitude, 1);
42
38
  const displayValue = def.key === "iv" ? `${(value * 100).toFixed(def.decimals)}%` : value.toFixed(def.decimals);
43
- return /* @__PURE__ */ jsxRuntime.jsxs(
44
- "div",
45
- {
46
- className: cn(
47
- "flex items-center gap-1.5",
48
- compact ? "min-w-0" : "min-w-[100px]"
49
- ),
50
- children: [
51
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] font-semibold shrink-0", def.color), children: def.symbol }),
52
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-zinc-500 shrink-0 w-[34px]", children: def.label }),
53
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
54
- "font-mono tabular-nums text-xs text-zinc-200 shrink-0",
55
- value < 0 && "text-red-400"
56
- ), children: displayValue }),
57
- !compact && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-1 rounded-full bg-zinc-800 min-w-[24px] max-w-[48px] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
58
- "div",
39
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, minWidth: compact ? 0 : 100, children: [
40
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, fontWeight: "600", flexShrink: 0, color: def.color, children: def.symbol }),
41
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, flexShrink: 0, width: 34, color: "var(--color-text-secondary)", children: def.label }),
42
+ /* @__PURE__ */ jsxRuntime.jsx(
43
+ gui.Text,
44
+ {
45
+ fontSize: 12,
46
+ flexShrink: 0,
47
+ style: { fontFamily: "monospace" },
48
+ fontVariant: ["tabular-nums"],
49
+ color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-primary)",
50
+ children: displayValue
51
+ }
52
+ ),
53
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(
54
+ gui.View,
55
+ {
56
+ flex: 1,
57
+ height: 4,
58
+ borderRadius: 9999,
59
+ minWidth: 24,
60
+ maxWidth: 48,
61
+ overflow: "hidden",
62
+ backgroundColor: "var(--color-progress-track)",
63
+ children: /* @__PURE__ */ jsxRuntime.jsx(
64
+ gui.View,
59
65
  {
60
- className: cn("h-full rounded-full transition-all", def.barColor),
61
- style: { width: `${magnitude * 100}%`, opacity: 0.7 }
66
+ height: "100%",
67
+ borderRadius: 9999,
68
+ transition: "quick",
69
+ width: `${magnitude * 100}%`,
70
+ opacity: 0.7,
71
+ backgroundColor: def.barColor
62
72
  }
63
- ) })
64
- ]
65
- }
66
- );
73
+ )
74
+ }
75
+ )
76
+ ] });
67
77
  }
68
78
  var GreeksDisplay = React__namespace.forwardRef(
69
79
  function GreeksDisplay2(props, ref) {
@@ -88,14 +98,13 @@ var GreeksDisplay = React__namespace.forwardRef(
88
98
  };
89
99
  const activeGreeks = GREEKS.filter((g) => values[g.key] !== void 0);
90
100
  return /* @__PURE__ */ jsxRuntime.jsx(
91
- "div",
101
+ gui.XStack,
92
102
  {
93
103
  ref,
94
- className: cn(
95
- "flex flex-wrap items-center",
96
- compact ? "gap-3" : "gap-4",
97
- className
98
- ),
104
+ flexWrap: "wrap",
105
+ alignItems: "center",
106
+ gap: compact ? 12 : 16,
107
+ className,
99
108
  ...rest,
100
109
  children: activeGreeks.map((g) => /* @__PURE__ */ jsxRuntime.jsx(
101
110
  GreekItem,
@@ -1,47 +1,57 @@
1
1
  "use client";
2
+ import { XStack, Text, View } from '@hanzo/gui';
2
3
  import * as React from 'react';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
4
  import { jsx, jsxs } from 'react/jsx-runtime';
6
5
 
7
- function cn(...inputs) {
8
- return twMerge(clsx(inputs));
9
- }
10
6
  var GREEKS = [
11
- { key: "delta", label: "Delta", symbol: "\u0394", color: "text-[var(--foreground)]", barColor: "bg-[var(--foreground)]", decimals: 4, maxMagnitude: 1 },
12
- { key: "gamma", label: "Gamma", symbol: "\u0393", color: "text-[var(--chart-1)]", barColor: "bg-[var(--chart-1)]", decimals: 4, maxMagnitude: 0.1 },
13
- { key: "theta", label: "Theta", symbol: "\u0398", color: "text-[var(--chart-4)]", barColor: "bg-[var(--chart-4)]", decimals: 4, maxMagnitude: 1 },
14
- { key: "vega", label: "Vega", symbol: "\u03BD", color: "text-[var(--chart-2)]", barColor: "bg-[var(--chart-2)]", decimals: 4, maxMagnitude: 1 },
15
- { key: "rho", label: "Rho", symbol: "\u03C1", color: "text-[var(--chart-3)]", barColor: "bg-[var(--chart-3)]", decimals: 4, maxMagnitude: 1 },
16
- { key: "iv", label: "IV", symbol: "\u03C3", color: "text-[var(--chart-5)]", barColor: "bg-[var(--chart-5)]", decimals: 1, maxMagnitude: 100 }
7
+ { key: "delta", label: "Delta", symbol: "\u0394", color: "var(--foreground)", barColor: "var(--foreground)", decimals: 4, maxMagnitude: 1 },
8
+ { key: "gamma", label: "Gamma", symbol: "\u0393", color: "var(--chart-1)", barColor: "var(--chart-1)", decimals: 4, maxMagnitude: 0.1 },
9
+ { key: "theta", label: "Theta", symbol: "\u0398", color: "var(--chart-4)", barColor: "var(--chart-4)", decimals: 4, maxMagnitude: 1 },
10
+ { key: "vega", label: "Vega", symbol: "\u03BD", color: "var(--chart-2)", barColor: "var(--chart-2)", decimals: 4, maxMagnitude: 1 },
11
+ { key: "rho", label: "Rho", symbol: "\u03C1", color: "var(--chart-3)", barColor: "var(--chart-3)", decimals: 4, maxMagnitude: 1 },
12
+ { key: "iv", label: "IV", symbol: "\u03C3", color: "var(--chart-5)", barColor: "var(--chart-5)", decimals: 1, maxMagnitude: 100 }
17
13
  ];
18
14
  function GreekItem({ def, value, compact }) {
19
15
  const magnitude = Math.min(Math.abs(value) / def.maxMagnitude, 1);
20
16
  const displayValue = def.key === "iv" ? `${(value * 100).toFixed(def.decimals)}%` : value.toFixed(def.decimals);
21
- return /* @__PURE__ */ jsxs(
22
- "div",
23
- {
24
- className: cn(
25
- "flex items-center gap-1.5",
26
- compact ? "min-w-0" : "min-w-[100px]"
27
- ),
28
- children: [
29
- /* @__PURE__ */ jsx("span", { className: cn("text-[10px] font-semibold shrink-0", def.color), children: def.symbol }),
30
- !compact && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-zinc-500 shrink-0 w-[34px]", children: def.label }),
31
- /* @__PURE__ */ jsx("span", { className: cn(
32
- "font-mono tabular-nums text-xs text-zinc-200 shrink-0",
33
- value < 0 && "text-red-400"
34
- ), children: displayValue }),
35
- !compact && /* @__PURE__ */ jsx("div", { className: "flex-1 h-1 rounded-full bg-zinc-800 min-w-[24px] max-w-[48px] overflow-hidden", children: /* @__PURE__ */ jsx(
36
- "div",
17
+ return /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 6, minWidth: compact ? 0 : 100, children: [
18
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, fontWeight: "600", flexShrink: 0, color: def.color, children: def.symbol }),
19
+ !compact && /* @__PURE__ */ jsx(Text, { fontSize: 10, flexShrink: 0, width: 34, color: "var(--color-text-secondary)", children: def.label }),
20
+ /* @__PURE__ */ jsx(
21
+ Text,
22
+ {
23
+ fontSize: 12,
24
+ flexShrink: 0,
25
+ style: { fontFamily: "monospace" },
26
+ fontVariant: ["tabular-nums"],
27
+ color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-primary)",
28
+ children: displayValue
29
+ }
30
+ ),
31
+ !compact && /* @__PURE__ */ jsx(
32
+ View,
33
+ {
34
+ flex: 1,
35
+ height: 4,
36
+ borderRadius: 9999,
37
+ minWidth: 24,
38
+ maxWidth: 48,
39
+ overflow: "hidden",
40
+ backgroundColor: "var(--color-progress-track)",
41
+ children: /* @__PURE__ */ jsx(
42
+ View,
37
43
  {
38
- className: cn("h-full rounded-full transition-all", def.barColor),
39
- style: { width: `${magnitude * 100}%`, opacity: 0.7 }
44
+ height: "100%",
45
+ borderRadius: 9999,
46
+ transition: "quick",
47
+ width: `${magnitude * 100}%`,
48
+ opacity: 0.7,
49
+ backgroundColor: def.barColor
40
50
  }
41
- ) })
42
- ]
43
- }
44
- );
51
+ )
52
+ }
53
+ )
54
+ ] });
45
55
  }
46
56
  var GreeksDisplay = React.forwardRef(
47
57
  function GreeksDisplay2(props, ref) {
@@ -66,14 +76,13 @@ var GreeksDisplay = React.forwardRef(
66
76
  };
67
77
  const activeGreeks = GREEKS.filter((g) => values[g.key] !== void 0);
68
78
  return /* @__PURE__ */ jsx(
69
- "div",
79
+ XStack,
70
80
  {
71
81
  ref,
72
- className: cn(
73
- "flex flex-wrap items-center",
74
- compact ? "gap-3" : "gap-4",
75
- className
76
- ),
82
+ flexWrap: "wrap",
83
+ alignItems: "center",
84
+ gap: compact ? 12 : 16,
85
+ className,
77
86
  ...rest,
78
87
  children: activeGreeks.map((g) => /* @__PURE__ */ jsx(
79
88
  GreekItem,