@luxfi/ui 7.4.0 → 7.4.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.
Files changed (131) hide show
  1. package/dist/avatar.cjs +7 -6
  2. package/dist/avatar.js +7 -5
  3. package/dist/badge.cjs +33 -35
  4. package/dist/badge.js +33 -35
  5. package/dist/bank.d.cts +3 -3
  6. package/dist/bank.d.ts +3 -3
  7. package/dist/checkbox.cjs +4 -4
  8. package/dist/checkbox.d.cts +3 -2
  9. package/dist/checkbox.d.ts +3 -2
  10. package/dist/checkbox.js +5 -4
  11. package/dist/chrome.cjs +960 -0
  12. package/dist/chrome.d.cts +93 -0
  13. package/dist/chrome.d.ts +93 -0
  14. package/dist/chrome.js +931 -0
  15. package/dist/drawer.cjs +86 -20
  16. package/dist/drawer.js +85 -19
  17. package/dist/expiration-selector.cjs +3 -2
  18. package/dist/expiration-selector.js +3 -2
  19. package/dist/greeks-display.cjs +6 -6
  20. package/dist/greeks-display.js +6 -6
  21. package/dist/gui.cjs +13 -0
  22. package/dist/gui.d.cts +2 -0
  23. package/dist/gui.d.ts +2 -0
  24. package/dist/gui.js +2 -0
  25. package/dist/heading.cjs +4 -2
  26. package/dist/heading.js +4 -2
  27. package/dist/iam.cjs +216 -0
  28. package/dist/iam.d.cts +65 -0
  29. package/dist/iam.d.ts +65 -0
  30. package/dist/iam.js +211 -0
  31. package/dist/icons.cjs +13 -0
  32. package/dist/icons.d.cts +1 -0
  33. package/dist/icons.d.ts +1 -0
  34. package/dist/icons.js +2 -0
  35. package/dist/identity.cjs +430 -0
  36. package/dist/identity.d.cts +64 -0
  37. package/dist/identity.d.ts +64 -0
  38. package/dist/identity.js +408 -0
  39. package/dist/index.cjs +1610 -836
  40. package/dist/index.d.cts +7 -3
  41. package/dist/index.d.ts +7 -3
  42. package/dist/index.js +1587 -831
  43. package/dist/input.cjs +3 -1
  44. package/dist/input.d.cts +3 -5
  45. package/dist/input.d.ts +3 -5
  46. package/dist/input.js +3 -1
  47. package/dist/lux.config.cjs +23 -2
  48. package/dist/lux.config.d.cts +28 -10
  49. package/dist/lux.config.d.ts +28 -10
  50. package/dist/lux.config.js +23 -2
  51. package/dist/menu.cjs +4 -4
  52. package/dist/menu.js +4 -4
  53. package/dist/next.cjs +132 -0
  54. package/dist/next.d.cts +32 -0
  55. package/dist/next.d.ts +32 -0
  56. package/dist/next.js +129 -0
  57. package/dist/option-chain.cjs +1 -1
  58. package/dist/option-chain.js +1 -1
  59. package/dist/option-position.cjs +2 -1
  60. package/dist/option-position.js +2 -1
  61. package/dist/pnl-diagram.cjs +8 -6
  62. package/dist/pnl-diagram.js +8 -6
  63. package/dist/progress.cjs +7 -6
  64. package/dist/progress.js +7 -5
  65. package/dist/provider.cjs +146 -4
  66. package/dist/provider.d.cts +15 -3
  67. package/dist/provider.d.ts +15 -3
  68. package/dist/provider.js +146 -5
  69. package/dist/radio.cjs +9 -7
  70. package/dist/radio.js +10 -7
  71. package/dist/separator.cjs +3 -1
  72. package/dist/separator.js +3 -1
  73. package/dist/slider.cjs +28 -16
  74. package/dist/slider.js +28 -15
  75. package/dist/strategy-builder.cjs +2 -1
  76. package/dist/strategy-builder.js +2 -1
  77. package/dist/switch.cjs +11 -12
  78. package/dist/switch.js +12 -12
  79. package/dist/tag.cjs +34 -36
  80. package/dist/tag.js +33 -35
  81. package/dist/textarea.cjs +3 -1
  82. package/dist/textarea.js +3 -1
  83. package/dist/tooltip.cjs +28 -30
  84. package/dist/tooltip.js +27 -29
  85. package/dist/use-narrow.cjs +46 -0
  86. package/dist/use-narrow.d.cts +12 -0
  87. package/dist/use-narrow.d.ts +12 -0
  88. package/dist/use-narrow.js +20 -0
  89. package/dist/vite.cjs +109 -0
  90. package/dist/vite.d.cts +29 -0
  91. package/dist/vite.d.ts +29 -0
  92. package/dist/vite.js +107 -0
  93. package/dist/white-label.cjs +142 -0
  94. package/dist/white-label.d.cts +59 -0
  95. package/dist/white-label.d.ts +59 -0
  96. package/dist/white-label.js +134 -0
  97. package/package.json +85 -19
  98. package/src/avatar.tsx +22 -16
  99. package/src/checkbox.tsx +15 -10
  100. package/src/chrome.tsx +459 -0
  101. package/src/drawer.tsx +83 -10
  102. package/src/engine.ts +130 -0
  103. package/src/expiration-selector.tsx +3 -2
  104. package/src/greeks-display.tsx +9 -6
  105. package/src/gui.ts +17 -0
  106. package/src/heading.tsx +12 -8
  107. package/src/iam.ts +170 -0
  108. package/src/icons.ts +18 -0
  109. package/src/identity.tsx +318 -0
  110. package/src/index.ts +44 -1
  111. package/src/input.tsx +13 -9
  112. package/src/lux.config.ts +16 -15
  113. package/src/menu.tsx +4 -4
  114. package/src/next.ts +89 -0
  115. package/src/option-chain.tsx +1 -1
  116. package/src/option-position.tsx +2 -1
  117. package/src/pnl-diagram.tsx +11 -6
  118. package/src/progress.tsx +15 -8
  119. package/src/provider.tsx +48 -7
  120. package/src/radio.tsx +15 -11
  121. package/src/separator.tsx +8 -3
  122. package/src/slider.tsx +35 -19
  123. package/src/strategy-builder.tsx +3 -2
  124. package/src/switch.tsx +17 -16
  125. package/src/textarea.tsx +8 -4
  126. package/src/tooltip.tsx +15 -24
  127. package/src/use-narrow.ts +40 -0
  128. package/src/vite.ts +80 -0
  129. package/src/white-label.ts +254 -0
  130. package/tokens.css +613 -319
  131. package/src/tokens.css +0 -438
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import { IdentityStatus } from './identity.cjs';
3
+ import './iam.cjs';
4
+ import './white-label.cjs';
5
+
6
+ /** One row in a switcher. */
7
+ interface ChromeItem {
8
+ readonly id: string;
9
+ readonly label: string;
10
+ /** Secondary text, right-aligned — a plan, a count, a shortcut. */
11
+ readonly hint?: string;
12
+ readonly icon?: React.ReactNode;
13
+ readonly selected?: boolean;
14
+ readonly danger?: boolean;
15
+ readonly href?: string;
16
+ readonly onSelect?: () => void;
17
+ }
18
+ /** 1–2 letter monogram — the honest fallback when there is no logo. */
19
+ declare function initials(label: string): string;
20
+ interface SwitcherProps {
21
+ /** Panel heading, drawer title and the trigger's accessible name. */
22
+ readonly title: string;
23
+ /** Trigger label. */
24
+ readonly label: string;
25
+ /** Trigger icon — usually a logo or monogram. */
26
+ readonly icon?: React.ReactNode;
27
+ readonly items: ReadonlyArray<ChromeItem>;
28
+ /** Rows below a separator — create, settings, sign out. */
29
+ readonly footer?: ReadonlyArray<ChromeItem>;
30
+ /** Drives the honest empty states. Defaults to 'ready'. */
31
+ readonly status?: IdentityStatus;
32
+ /** Shown when signed in and the list really is empty. */
33
+ readonly empty?: string;
34
+ /** Shown, as a sign-in action, when nobody is signed in. */
35
+ readonly onSignIn?: () => void;
36
+ readonly signInLabel?: string;
37
+ readonly error?: string | null;
38
+ readonly align?: 'start' | 'end';
39
+ readonly testId?: string;
40
+ }
41
+ /**
42
+ * The ONE switcher. A trigger plus rows, presented as a phone sheet or an
43
+ * anchored menu depending on the viewport — never both, never hand-rolled.
44
+ */
45
+ declare const Switcher: ({ title, label, icon, items, footer, status, empty, onSignIn, signInLabel, error, align, testId, }: SwitcherProps) => React.ReactElement;
46
+ /** Which organization is this surface acting as. */
47
+ declare const OrgSwitcher: () => React.ReactElement;
48
+ /** Which project inside that organization. */
49
+ declare const ProjectSwitcher: () => React.ReactElement | null;
50
+ interface UserMenuProps {
51
+ /** Extra rows above Sign out — Profile, API keys, whatever the surface has. */
52
+ readonly items?: ReadonlyArray<ChromeItem>;
53
+ }
54
+ /** Who is signed in, and how to stop being signed in. */
55
+ declare const UserMenu: ({ items }: UserMenuProps) => React.ReactElement;
56
+ interface SettingsMenuProps {
57
+ /** The surface's own settings rows. */
58
+ readonly items?: ReadonlyArray<ChromeItem>;
59
+ /** Where "All settings" goes. */
60
+ readonly href?: string;
61
+ }
62
+ /** The surface's settings, in the one place a user looks for them. */
63
+ declare const SettingsMenu: ({ items, href }: SettingsMenuProps) => React.ReactElement;
64
+ interface NavLink {
65
+ readonly href: string;
66
+ readonly label: string;
67
+ readonly active?: boolean;
68
+ }
69
+ interface AppNavProps {
70
+ /** Brand slot — defaults to the host-resolved org name. */
71
+ readonly brand?: React.ReactNode;
72
+ /** Where the brand links to. */
73
+ readonly home?: string;
74
+ readonly links?: ReadonlyArray<NavLink>;
75
+ /** Show the org switcher. Default true. */
76
+ readonly org?: boolean;
77
+ /** Show the project switcher. Default false — most surfaces have no projects. */
78
+ readonly project?: boolean;
79
+ /** Rows for the settings menu; omit the prop to hide the menu. */
80
+ readonly settings?: ReadonlyArray<ChromeItem>;
81
+ /** Extra rows in the user menu. */
82
+ readonly userItems?: ReadonlyArray<ChromeItem>;
83
+ /** Free slot between the links and the right-hand cluster. */
84
+ readonly children?: React.ReactNode;
85
+ }
86
+ /**
87
+ * The ONE nav. Brand, org, project, links, settings, user — in that order, at
88
+ * every surface. On a phone the links collapse into the same sheet the
89
+ * switchers use, so there is no second mobile menu to maintain.
90
+ */
91
+ declare const AppNav: ({ brand, home, links, org, project, settings, userItems, children, }: AppNavProps) => React.ReactElement;
92
+
93
+ export { AppNav, type AppNavProps, type ChromeItem, type NavLink, OrgSwitcher, ProjectSwitcher, SettingsMenu, type SettingsMenuProps, Switcher, type SwitcherProps, UserMenu, type UserMenuProps, initials };
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import { IdentityStatus } from './identity.js';
3
+ import './iam.js';
4
+ import './white-label.js';
5
+
6
+ /** One row in a switcher. */
7
+ interface ChromeItem {
8
+ readonly id: string;
9
+ readonly label: string;
10
+ /** Secondary text, right-aligned — a plan, a count, a shortcut. */
11
+ readonly hint?: string;
12
+ readonly icon?: React.ReactNode;
13
+ readonly selected?: boolean;
14
+ readonly danger?: boolean;
15
+ readonly href?: string;
16
+ readonly onSelect?: () => void;
17
+ }
18
+ /** 1–2 letter monogram — the honest fallback when there is no logo. */
19
+ declare function initials(label: string): string;
20
+ interface SwitcherProps {
21
+ /** Panel heading, drawer title and the trigger's accessible name. */
22
+ readonly title: string;
23
+ /** Trigger label. */
24
+ readonly label: string;
25
+ /** Trigger icon — usually a logo or monogram. */
26
+ readonly icon?: React.ReactNode;
27
+ readonly items: ReadonlyArray<ChromeItem>;
28
+ /** Rows below a separator — create, settings, sign out. */
29
+ readonly footer?: ReadonlyArray<ChromeItem>;
30
+ /** Drives the honest empty states. Defaults to 'ready'. */
31
+ readonly status?: IdentityStatus;
32
+ /** Shown when signed in and the list really is empty. */
33
+ readonly empty?: string;
34
+ /** Shown, as a sign-in action, when nobody is signed in. */
35
+ readonly onSignIn?: () => void;
36
+ readonly signInLabel?: string;
37
+ readonly error?: string | null;
38
+ readonly align?: 'start' | 'end';
39
+ readonly testId?: string;
40
+ }
41
+ /**
42
+ * The ONE switcher. A trigger plus rows, presented as a phone sheet or an
43
+ * anchored menu depending on the viewport — never both, never hand-rolled.
44
+ */
45
+ declare const Switcher: ({ title, label, icon, items, footer, status, empty, onSignIn, signInLabel, error, align, testId, }: SwitcherProps) => React.ReactElement;
46
+ /** Which organization is this surface acting as. */
47
+ declare const OrgSwitcher: () => React.ReactElement;
48
+ /** Which project inside that organization. */
49
+ declare const ProjectSwitcher: () => React.ReactElement | null;
50
+ interface UserMenuProps {
51
+ /** Extra rows above Sign out — Profile, API keys, whatever the surface has. */
52
+ readonly items?: ReadonlyArray<ChromeItem>;
53
+ }
54
+ /** Who is signed in, and how to stop being signed in. */
55
+ declare const UserMenu: ({ items }: UserMenuProps) => React.ReactElement;
56
+ interface SettingsMenuProps {
57
+ /** The surface's own settings rows. */
58
+ readonly items?: ReadonlyArray<ChromeItem>;
59
+ /** Where "All settings" goes. */
60
+ readonly href?: string;
61
+ }
62
+ /** The surface's settings, in the one place a user looks for them. */
63
+ declare const SettingsMenu: ({ items, href }: SettingsMenuProps) => React.ReactElement;
64
+ interface NavLink {
65
+ readonly href: string;
66
+ readonly label: string;
67
+ readonly active?: boolean;
68
+ }
69
+ interface AppNavProps {
70
+ /** Brand slot — defaults to the host-resolved org name. */
71
+ readonly brand?: React.ReactNode;
72
+ /** Where the brand links to. */
73
+ readonly home?: string;
74
+ readonly links?: ReadonlyArray<NavLink>;
75
+ /** Show the org switcher. Default true. */
76
+ readonly org?: boolean;
77
+ /** Show the project switcher. Default false — most surfaces have no projects. */
78
+ readonly project?: boolean;
79
+ /** Rows for the settings menu; omit the prop to hide the menu. */
80
+ readonly settings?: ReadonlyArray<ChromeItem>;
81
+ /** Extra rows in the user menu. */
82
+ readonly userItems?: ReadonlyArray<ChromeItem>;
83
+ /** Free slot between the links and the right-hand cluster. */
84
+ readonly children?: React.ReactNode;
85
+ }
86
+ /**
87
+ * The ONE nav. Brand, org, project, links, settings, user — in that order, at
88
+ * every surface. On a phone the links collapse into the same sheet the
89
+ * switchers use, so there is no second mobile menu to maintain.
90
+ */
91
+ declare const AppNav: ({ brand, home, links, org, project, settings, userItems, children, }: AppNavProps) => React.ReactElement;
92
+
93
+ export { AppNav, type AppNavProps, type ChromeItem, type NavLink, OrgSwitcher, ProjectSwitcher, SettingsMenu, type SettingsMenuProps, Switcher, type SwitcherProps, UserMenu, type UserMenuProps, initials };