@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.
- package/dist/accordion.cjs +107 -166
- package/dist/accordion.d.cts +18 -51
- package/dist/accordion.d.ts +18 -51
- package/dist/accordion.js +109 -166
- package/dist/alert.cjs +68 -46
- package/dist/alert.js +69 -46
- package/dist/avatar.cjs +49 -46
- package/dist/avatar.js +52 -48
- package/dist/badge.cjs +82 -49
- package/dist/badge.js +83 -50
- package/dist/checkbox.cjs +42 -75
- package/dist/checkbox.js +43 -76
- package/dist/chrome.cjs +196 -386
- package/dist/chrome.js +198 -386
- package/dist/close-button.cjs +3 -7
- package/dist/close-button.js +3 -7
- package/dist/collapsible.cjs +35 -26
- package/dist/collapsible.d.cts +2 -1
- package/dist/collapsible.d.ts +2 -1
- package/dist/collapsible.js +34 -24
- package/dist/dialog.cjs +3 -7
- package/dist/dialog.d.cts +1 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +3 -7
- package/dist/drawer.cjs +95 -122
- package/dist/drawer.d.cts +43 -10
- package/dist/drawer.d.ts +43 -10
- package/dist/drawer.js +97 -122
- package/dist/empty-state.cjs +13 -13
- package/dist/empty-state.js +13 -13
- package/dist/expiration-selector.cjs +58 -63
- package/dist/expiration-selector.js +58 -63
- package/dist/field.cjs +60 -109
- package/dist/field.d.cts +0 -1
- package/dist/field.d.ts +0 -1
- package/dist/field.js +61 -109
- package/dist/greeks-display.cjs +48 -39
- package/dist/greeks-display.js +48 -39
- package/dist/heading.cjs +10 -17
- package/dist/heading.d.cts +0 -2
- package/dist/heading.d.ts +0 -2
- package/dist/heading.js +10 -17
- package/dist/icon-button.cjs +82 -82
- package/dist/icon-button.d.cts +16 -12
- package/dist/icon-button.d.ts +16 -12
- package/dist/icon-button.js +82 -82
- package/dist/index.cjs +1812 -2105
- package/dist/index.d.cts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1814 -2100
- package/dist/input-group.cjs +11 -12
- package/dist/input-group.js +11 -12
- package/dist/input.cjs +27 -27
- package/dist/input.d.cts +21 -1
- package/dist/input.d.ts +21 -1
- package/dist/input.js +25 -28
- package/dist/menu.cjs +160 -271
- package/dist/menu.d.cts +41 -57
- package/dist/menu.d.ts +41 -57
- package/dist/menu.js +161 -251
- package/dist/option-chain.cjs +89 -67
- package/dist/option-chain.js +89 -67
- package/dist/option-position.cjs +88 -85
- package/dist/option-position.js +88 -85
- package/dist/pnl-diagram.cjs +20 -20
- package/dist/pnl-diagram.js +20 -20
- package/dist/popover.cjs +4 -8
- package/dist/popover.js +4 -8
- package/dist/progress.cjs +15 -22
- package/dist/progress.d.cts +6 -6
- package/dist/progress.d.ts +6 -6
- package/dist/progress.js +15 -22
- package/dist/radio.cjs +35 -67
- package/dist/radio.d.cts +18 -18
- package/dist/radio.d.ts +18 -18
- package/dist/radio.js +36 -68
- package/dist/select.cjs +40 -39
- package/dist/select.d.cts +35 -4
- package/dist/select.d.ts +35 -4
- package/dist/select.js +40 -38
- package/dist/separator.cjs +8 -33
- package/dist/separator.js +8 -33
- package/dist/slider.cjs +33 -49
- package/dist/slider.js +34 -50
- package/dist/switch.cjs +48 -55
- package/dist/switch.js +49 -56
- package/dist/tabs.cjs +108 -197
- package/dist/tabs.d.cts +16 -60
- package/dist/tabs.d.ts +16 -60
- package/dist/tabs.js +109 -196
- package/dist/tag.cjs +112 -69
- package/dist/tag.js +113 -69
- package/dist/textarea.cjs +56 -27
- package/dist/textarea.js +57 -28
- package/dist/toaster.cjs +97 -79
- package/dist/toaster.d.cts +7 -8
- package/dist/toaster.d.ts +7 -8
- package/dist/toaster.js +78 -80
- package/dist/tooltip.cjs +28 -17
- package/dist/tooltip.js +30 -18
- package/package.json +2 -16
- package/src/accordion.tsx +173 -227
- package/src/alert.tsx +78 -45
- package/src/avatar.tsx +54 -37
- package/src/badge.tsx +65 -44
- package/src/checkbox.tsx +70 -89
- package/src/close-button.tsx +3 -8
- package/src/collapsible.tsx +55 -52
- package/src/drawer.tsx +123 -115
- package/src/empty-state.tsx +21 -17
- package/src/expiration-selector.tsx +84 -66
- package/src/field.tsx +68 -124
- package/src/greeks-display.tsx +59 -51
- package/src/heading.tsx +22 -26
- package/src/icon-button.tsx +134 -141
- package/src/ink.tsx +37 -0
- package/src/input-group.tsx +59 -36
- package/src/input.tsx +41 -32
- package/src/menu.tsx +224 -397
- package/src/option-chain.tsx +154 -104
- package/src/option-position.tsx +136 -114
- package/src/pin-input.tsx +37 -29
- package/src/pnl-diagram.tsx +36 -28
- package/src/popover.tsx +1 -1
- package/src/progress.tsx +17 -21
- package/src/radio.tsx +56 -75
- package/src/select.tsx +80 -59
- package/src/separator.tsx +13 -34
- package/src/slider.tsx +43 -44
- package/src/strategy-builder.tsx +245 -156
- package/src/switch.tsx +63 -64
- package/src/tabs.tsx +166 -296
- package/src/tag.tsx +89 -51
- package/src/textarea.tsx +19 -29
- package/src/toaster.tsx +118 -86
- package/src/tooltip.tsx +21 -13
- 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. */
|