@luxfi/ui 7.4.10 → 7.4.12

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 (137) hide show
  1. package/dist/accordion.cjs +107 -166
  2. package/dist/accordion.d.cts +18 -51
  3. package/dist/accordion.d.ts +18 -51
  4. package/dist/accordion.js +109 -166
  5. package/dist/alert.cjs +68 -46
  6. package/dist/alert.js +69 -46
  7. package/dist/avatar.cjs +49 -46
  8. package/dist/avatar.js +52 -48
  9. package/dist/badge.cjs +82 -49
  10. package/dist/badge.js +83 -50
  11. package/dist/checkbox.cjs +42 -75
  12. package/dist/checkbox.js +43 -76
  13. package/dist/chrome.cjs +196 -386
  14. package/dist/chrome.js +198 -386
  15. package/dist/close-button.cjs +3 -7
  16. package/dist/close-button.js +3 -7
  17. package/dist/collapsible.cjs +35 -26
  18. package/dist/collapsible.d.cts +2 -1
  19. package/dist/collapsible.d.ts +2 -1
  20. package/dist/collapsible.js +34 -24
  21. package/dist/dialog.cjs +3 -7
  22. package/dist/dialog.d.cts +1 -1
  23. package/dist/dialog.d.ts +1 -1
  24. package/dist/dialog.js +3 -7
  25. package/dist/drawer.cjs +95 -122
  26. package/dist/drawer.d.cts +43 -10
  27. package/dist/drawer.d.ts +43 -10
  28. package/dist/drawer.js +97 -122
  29. package/dist/empty-state.cjs +13 -13
  30. package/dist/empty-state.js +13 -13
  31. package/dist/expiration-selector.cjs +58 -63
  32. package/dist/expiration-selector.js +58 -63
  33. package/dist/field.cjs +60 -109
  34. package/dist/field.d.cts +0 -1
  35. package/dist/field.d.ts +0 -1
  36. package/dist/field.js +61 -109
  37. package/dist/greeks-display.cjs +48 -39
  38. package/dist/greeks-display.js +48 -39
  39. package/dist/heading.cjs +10 -17
  40. package/dist/heading.d.cts +0 -2
  41. package/dist/heading.d.ts +0 -2
  42. package/dist/heading.js +10 -17
  43. package/dist/icon-button.cjs +82 -82
  44. package/dist/icon-button.d.cts +16 -12
  45. package/dist/icon-button.d.ts +16 -12
  46. package/dist/icon-button.js +82 -82
  47. package/dist/index.cjs +1812 -2105
  48. package/dist/index.d.cts +1 -5
  49. package/dist/index.d.ts +1 -5
  50. package/dist/index.js +1814 -2100
  51. package/dist/input-group.cjs +11 -12
  52. package/dist/input-group.js +11 -12
  53. package/dist/input.cjs +27 -27
  54. package/dist/input.d.cts +21 -1
  55. package/dist/input.d.ts +21 -1
  56. package/dist/input.js +25 -28
  57. package/dist/menu.cjs +160 -271
  58. package/dist/menu.d.cts +41 -57
  59. package/dist/menu.d.ts +41 -57
  60. package/dist/menu.js +161 -251
  61. package/dist/option-chain.cjs +89 -67
  62. package/dist/option-chain.js +89 -67
  63. package/dist/option-position.cjs +88 -85
  64. package/dist/option-position.js +88 -85
  65. package/dist/pnl-diagram.cjs +20 -20
  66. package/dist/pnl-diagram.js +20 -20
  67. package/dist/popover.cjs +4 -8
  68. package/dist/popover.js +4 -8
  69. package/dist/progress.cjs +15 -22
  70. package/dist/progress.d.cts +6 -6
  71. package/dist/progress.d.ts +6 -6
  72. package/dist/progress.js +15 -22
  73. package/dist/radio.cjs +35 -67
  74. package/dist/radio.d.cts +18 -18
  75. package/dist/radio.d.ts +18 -18
  76. package/dist/radio.js +36 -68
  77. package/dist/select.cjs +40 -39
  78. package/dist/select.d.cts +35 -4
  79. package/dist/select.d.ts +35 -4
  80. package/dist/select.js +40 -38
  81. package/dist/separator.cjs +8 -33
  82. package/dist/separator.js +8 -33
  83. package/dist/slider.cjs +33 -49
  84. package/dist/slider.js +34 -50
  85. package/dist/switch.cjs +48 -55
  86. package/dist/switch.js +49 -56
  87. package/dist/tabs.cjs +108 -197
  88. package/dist/tabs.d.cts +16 -60
  89. package/dist/tabs.d.ts +16 -60
  90. package/dist/tabs.js +109 -196
  91. package/dist/tag.cjs +112 -69
  92. package/dist/tag.js +113 -69
  93. package/dist/textarea.cjs +56 -27
  94. package/dist/textarea.js +57 -28
  95. package/dist/toaster.cjs +97 -79
  96. package/dist/toaster.d.cts +7 -8
  97. package/dist/toaster.d.ts +7 -8
  98. package/dist/toaster.js +78 -80
  99. package/dist/tooltip.cjs +28 -17
  100. package/dist/tooltip.js +30 -18
  101. package/package.json +2 -16
  102. package/src/accordion.tsx +173 -227
  103. package/src/alert.tsx +78 -45
  104. package/src/avatar.tsx +54 -37
  105. package/src/badge.tsx +65 -44
  106. package/src/checkbox.tsx +70 -89
  107. package/src/close-button.tsx +3 -8
  108. package/src/collapsible.tsx +55 -52
  109. package/src/drawer.tsx +123 -115
  110. package/src/empty-state.tsx +21 -17
  111. package/src/expiration-selector.tsx +84 -66
  112. package/src/field.tsx +68 -124
  113. package/src/greeks-display.tsx +59 -51
  114. package/src/heading.tsx +22 -26
  115. package/src/icon-button.tsx +134 -141
  116. package/src/ink.tsx +37 -0
  117. package/src/input-group.tsx +59 -36
  118. package/src/input.tsx +41 -32
  119. package/src/menu.tsx +224 -397
  120. package/src/option-chain.tsx +154 -104
  121. package/src/option-position.tsx +136 -114
  122. package/src/pin-input.tsx +37 -29
  123. package/src/pnl-diagram.tsx +36 -28
  124. package/src/popover.tsx +1 -1
  125. package/src/progress.tsx +17 -21
  126. package/src/radio.tsx +56 -75
  127. package/src/select.tsx +80 -59
  128. package/src/separator.tsx +13 -34
  129. package/src/slider.tsx +43 -44
  130. package/src/strategy-builder.tsx +245 -156
  131. package/src/switch.tsx +63 -64
  132. package/src/tabs.tsx +166 -296
  133. package/src/tag.tsx +89 -51
  134. package/src/textarea.tsx +19 -29
  135. package/src/toaster.tsx +118 -86
  136. package/src/tooltip.tsx +21 -13
  137. package/tokens.css +79 -0
package/tokens.css CHANGED
@@ -97,6 +97,7 @@
97
97
  /* --- Text --- */
98
98
  --color-text-primary: var(--lux-ink-80);
99
99
  --color-text-secondary: var(--lux-n-500);
100
+ --color-text-disabled: var(--lux-ink-24);
100
101
  --color-text-error: var(--lux-state-error);
101
102
  --color-text-success: var(--lux-state-success);
102
103
 
@@ -174,8 +175,17 @@
174
175
  --color-input-border: var(--lux-n-100);
175
176
  --color-input-border-hover: var(--lux-n-200);
176
177
  --color-input-border-focus: var(--lux-n-600);
178
+ /* Three states that were being ASKED for and never answered: input.tsx and
179
+ textarea.tsx reference these, and nothing declared them. Their written
180
+ fallback was `theme(colors.red.500)`-style, which is a Tailwind 3 function
181
+ that v4 does not resolve inside an arbitrary value — so the whole
182
+ declaration was discarded. An invalid field drew no error border and the
183
+ `filled` variant drew no fill, in both themes. */
184
+ --color-input-border-error: var(--lux-state-error);
185
+ --color-input-filled-bg: var(--lux-n-50);
177
186
  /* n-400 on white is 2.5:1 — under the 3:1 non-text minimum. n-500 clears it. */
178
187
  --color-input-placeholder: var(--lux-n-500);
188
+ --color-input-placeholder-focus: var(--lux-n-400);
179
189
 
180
190
  /* --- Tags --- */
181
191
  --color-tag-subtle-bg: var(--lux-ink-04);
@@ -277,6 +287,11 @@
277
287
  /* --- Controls --- */
278
288
  --color-switch-bg: var(--lux-n-300);
279
289
  --color-progress-track: var(--lux-n-100);
290
+ /* The FILL. Referenced by progress.tsx and never declared, so the bar drew
291
+ its track and nothing else. */
292
+ --color-progress-indicator: var(--lux-n-900);
293
+ /* The row highlight shared by every menu and popover list. */
294
+ --color-popover-item-hover: var(--lux-ink-06);
280
295
 
281
296
  /* --- Chrome / charts --- */
282
297
  --color-stats-bg: var(--lux-n-50);
@@ -488,6 +503,7 @@
488
503
  /* --- Text --- */
489
504
  --color-text-primary: var(--lux-paper-80);
490
505
  --color-text-secondary: var(--lux-n-400);
506
+ --color-text-disabled: var(--lux-paper-24);
491
507
  --color-text-error: var(--lux-state-error);
492
508
  --color-text-success: var(--lux-state-success);
493
509
 
@@ -565,7 +581,10 @@
565
581
  --color-input-border: var(--lux-n-800);
566
582
  --color-input-border-hover: var(--lux-n-700);
567
583
  --color-input-border-focus: var(--lux-n-400);
584
+ --color-input-border-error: var(--lux-state-error);
585
+ --color-input-filled-bg: var(--lux-n-800);
568
586
  --color-input-placeholder: var(--lux-n-500);
587
+ --color-input-placeholder-focus: var(--lux-n-600);
569
588
 
570
589
  /* --- Tags --- */
571
590
  --color-tag-subtle-bg: var(--lux-paper-06);
@@ -664,6 +683,8 @@
664
683
  /* --- Controls --- */
665
684
  --color-switch-bg: var(--lux-paper-24);
666
685
  --color-progress-track: var(--lux-paper-06);
686
+ --color-progress-indicator: var(--lux-n-0);
687
+ --color-popover-item-hover: var(--lux-paper-06);
667
688
 
668
689
  /* --- Chrome / charts --- */
669
690
  --color-stats-bg: var(--lux-paper-04);
@@ -838,6 +859,55 @@
838
859
  .lux-interactive:disabled,
839
860
  .lux-interactive[aria-disabled='true'] { transform: none }
840
861
 
862
+ /* The floating field label. This is CSS rather than a gui prop because it keys
863
+ off the state of a SIBLING (`:focus` / `:placeholder-shown` of the control),
864
+ and a sibling combinator is a selector — there is no prop that expresses it.
865
+ The label rests centred over the empty control and rises into the top of the
866
+ frame once the control is focused or holds a value. */
867
+ .lux-field-float {
868
+ transform: translateY(-50%);
869
+ transform-origin: top left;
870
+ transition: top var(--lux-dur-hover) var(--lux-ease-out),
871
+ transform var(--lux-dur-hover) var(--lux-ease-out);
872
+ }
873
+ .lux-field-control:focus ~ .lux-field-float,
874
+ .lux-field-control:not(:placeholder-shown) ~ .lux-field-float {
875
+ top: 4px;
876
+ transform: translateY(0) scale(0.75);
877
+ }
878
+
879
+ /* An accordion row's label brightens while the ROW is hovered. Also a
880
+ selector — the state belongs to the row, the colour to the label inside it —
881
+ so the row sets a colour and its contents inherit. */
882
+ .lux-accordion-trigger { color: var(--color-text-primary) }
883
+ .lux-accordion-trigger:hover { color: var(--color-hover) }
884
+
885
+ /* Text controls: the two states no prop reaches. `::placeholder` styles a
886
+ pseudo-element the input owns rather than the input, and `:read-only` is a
887
+ selector with no prop counterpart — gui offers disabled, hover and focus, not
888
+ this. Everything else about an Input or Textarea is a prop. */
889
+ /* A keyframe is not a prop — gui's transitions interpolate between two states,
890
+ they do not loop. The spinner rotates forever, so it is CSS. */
891
+ .lux-spin { animation: lux-spin 0.8s linear infinite }
892
+
893
+ /* A scrolling strip with no visible scrollbar. The scrollbar is a
894
+ pseudo-element on the box, so this is the only place it can be said. */
895
+ /* One-line truncation. `text-overflow` and `white-space` are not in gui's Text
896
+ style base, and the three declarations only mean anything together. */
897
+ .lux-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
898
+
899
+ .lux-no-scrollbar { scrollbar-width: none; -ms-overflow-style: none }
900
+ .lux-no-scrollbar::-webkit-scrollbar { display: none }
901
+
902
+ /* Size the ICON inside a control. A descendant selector has no prop form, so
903
+ the control publishes its icon size and this rule applies it. */
904
+ .lux-icon svg { width: var(--icon-size, 20px); height: var(--icon-size, 20px) }
905
+
906
+ .lux-control::placeholder { color: var(--color-input-placeholder) }
907
+ .lux-control:focus::placeholder { color: var(--color-input-placeholder-focus) }
908
+ .lux-control:read-only { opacity: 0.7 }
909
+ .lux-control[data-invalid] { border-color: var(--color-input-border-error) }
910
+
841
911
  /* ================================================================
842
912
  6c — The loading state. Two primitives, one job each.
843
913
 
@@ -882,6 +952,15 @@
882
952
  user-select: none;
883
953
  }
884
954
 
955
+ /* A skeleton wrapping real content (asChild, or loading with children already
956
+ mounted) must mask it — an <img> or an icon doesn't pick up `color:
957
+ transparent` above. `visibility` rather than `display:none` so the masked
958
+ subtree keeps its layout instead of collapsing it, which is the zero-CLS
959
+ promise this component makes. A descendant selector has no prop form. */
960
+ .lux-skeleton * {
961
+ visibility: hidden;
962
+ }
963
+
885
964
  /* The one moving part. Fixed, 2px, above everything, out of flow — so it
886
965
  cannot shift layout and cannot tint content. Mount it while any request
887
966
  is in flight; unmount it when they land. One per page. */