@luxfi/ui 7.3.1 → 7.4.0

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 (59) hide show
  1. package/dist/alert.cjs +2 -2
  2. package/dist/alert.js +1 -1
  3. package/dist/badge.cjs +6 -6
  4. package/dist/badge.js +1 -1
  5. package/dist/bank.cjs +13 -13
  6. package/dist/bank.d.cts +30 -23
  7. package/dist/bank.d.ts +30 -23
  8. package/dist/bank.js +1 -1
  9. package/dist/button.cjs +3 -3
  10. package/dist/button.js +1 -1
  11. package/dist/close-button.cjs +2 -2
  12. package/dist/close-button.js +1 -1
  13. package/dist/dialog.cjs +13 -14
  14. package/dist/dialog.d.cts +58 -5
  15. package/dist/dialog.d.ts +58 -5
  16. package/dist/dialog.js +1 -2
  17. package/dist/drawer.cjs +2 -2
  18. package/dist/drawer.js +1 -1
  19. package/dist/icon-button.cjs +2 -2
  20. package/dist/icon-button.js +1 -1
  21. package/dist/index.cjs +127 -59
  22. package/dist/index.d.cts +6 -2
  23. package/dist/index.d.ts +6 -2
  24. package/dist/index.js +85 -22
  25. package/dist/input.cjs +10 -2
  26. package/dist/input.d.cts +8 -0
  27. package/dist/input.d.ts +8 -0
  28. package/dist/input.js +10 -2
  29. package/dist/lux.config.cjs +56 -0
  30. package/dist/lux.config.d.cts +415 -0
  31. package/dist/lux.config.d.ts +415 -0
  32. package/dist/lux.config.js +48 -0
  33. package/dist/popover.cjs +8 -9
  34. package/dist/popover.js +1 -2
  35. package/dist/provider.cjs +62 -12
  36. package/dist/provider.d.cts +3 -2
  37. package/dist/provider.d.ts +3 -2
  38. package/dist/provider.js +62 -12
  39. package/dist/tag.cjs +7 -8
  40. package/dist/tag.js +1 -2
  41. package/dist/textarea.cjs +10 -2
  42. package/dist/textarea.d.cts +2 -0
  43. package/dist/textarea.d.ts +2 -0
  44. package/dist/textarea.js +10 -2
  45. package/dist/tooltip.cjs +6 -6
  46. package/dist/tooltip.js +1 -1
  47. package/package.json +24 -12
  48. package/src/bank.tsx +2 -2
  49. package/src/button.tsx +1 -1
  50. package/src/close-button.tsx +1 -1
  51. package/src/dialog.tsx +1 -1
  52. package/src/icon-button.tsx +1 -1
  53. package/src/index.ts +6 -0
  54. package/src/input.tsx +17 -1
  55. package/src/lux.config.ts +81 -0
  56. package/src/popover.tsx +1 -1
  57. package/src/provider.tsx +51 -15
  58. package/src/textarea.tsx +11 -1
  59. package/src/tooltip.tsx +2 -2
package/dist/dialog.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import * as _hanzo_gui from '@hanzo/gui';
2
+ import * as _hanzogui_web from '@hanzogui/web';
3
+ import * as _hanzogui_core from '@hanzogui/core';
1
4
  import * as React from 'react';
2
5
 
3
6
  type DialogSize = 'sm' | 'md' | 'full' | 'cover';
@@ -49,17 +52,67 @@ declare const DialogBody: React.ForwardRefExoticComponent<DialogBodyProps & Reac
49
52
  interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
50
53
  }
51
54
  declare const DialogFooter: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;
52
- declare const DialogBackdrop: any;
53
- declare const DialogTitle: any;
54
- declare const DialogDescription: any;
55
+ declare const DialogBackdrop: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
56
+ open?: boolean | undefined;
57
+ unstyled?: boolean | undefined;
58
+ elevation?: number | _hanzogui_web.SizeTokens | undefined;
59
+ fullscreen?: boolean | undefined;
60
+ }>, "forceMount" | "scope"> & {
61
+ forceMount?: boolean;
62
+ } & {
63
+ scope?: _hanzo_gui.DialogScopes;
64
+ }, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
65
+ forceMount?: boolean;
66
+ } & {
67
+ scope?: _hanzo_gui.DialogScopes;
68
+ }, _hanzogui_web.StackStyleBase, {
69
+ open?: boolean | undefined;
70
+ unstyled?: boolean | undefined;
71
+ elevation?: number | _hanzogui_web.SizeTokens | undefined;
72
+ fullscreen?: boolean | undefined;
73
+ }, _hanzogui_web.StaticConfigPublic>;
74
+ declare const DialogTitle: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_web.TextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
75
+ unstyled?: boolean | undefined;
76
+ size?: _hanzogui_web.FontSizeTokens | undefined;
77
+ }>, "scope"> & {
78
+ scope?: _hanzo_gui.DialogScopes;
79
+ }, _hanzogui_web.GuiTextElement, _hanzogui_web.TextNonStyleProps & {
80
+ scope?: _hanzo_gui.DialogScopes;
81
+ }, _hanzogui_web.TextStylePropsBase, {
82
+ unstyled?: boolean | undefined;
83
+ size?: _hanzogui_web.FontSizeTokens | undefined;
84
+ }, _hanzogui_web.StaticConfigPublic>;
85
+ declare const DialogDescription: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_web.TextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
86
+ unstyled?: boolean | undefined;
87
+ size?: _hanzogui_web.FontSizeTokens | undefined;
88
+ }>, "scope"> & {
89
+ scope?: _hanzo_gui.DialogScopes;
90
+ }, _hanzogui_web.GuiTextElement, _hanzogui_web.TextNonStyleProps & {
91
+ scope?: _hanzo_gui.DialogScopes;
92
+ }, _hanzogui_web.TextStylePropsBase, {
93
+ unstyled?: boolean | undefined;
94
+ size?: _hanzogui_web.FontSizeTokens | undefined;
95
+ }, _hanzogui_web.StaticConfigPublic>;
55
96
  interface DialogTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
56
97
  }
57
- declare const DialogTrigger: any;
98
+ declare const DialogTrigger: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}>, "scope"> & {
99
+ scope?: _hanzo_gui.DialogScopes;
100
+ }, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
101
+ scope?: _hanzo_gui.DialogScopes;
102
+ }, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
58
103
  /**
59
104
  * `DialogActionTrigger` renders its child and closes the dialog on click.
60
105
  * This mirrors the Chakra `Dialog.ActionTrigger` behavior which wraps
61
106
  * children in a close action.
62
107
  */
63
- declare const DialogActionTrigger: any;
108
+ declare const DialogActionTrigger: _hanzogui_web.GuiComponent<Omit<_hanzogui_web.GetFinalProps<_hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}>, "scope" | "displayWhenAdapted"> & {
109
+ displayWhenAdapted?: boolean;
110
+ } & {
111
+ scope?: _hanzo_gui.DialogScopes;
112
+ }, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps & {
113
+ displayWhenAdapted?: boolean;
114
+ } & {
115
+ scope?: _hanzo_gui.DialogScopes;
116
+ }, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
64
117
 
65
118
  export { DialogActionTrigger, DialogBackdrop, DialogBody, type DialogBodyProps, DialogCloseTrigger, type DialogCloseTriggerProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogRoot, type DialogRootProps, DialogTitle, DialogTrigger, type DialogTriggerProps };
package/dist/dialog.js CHANGED
@@ -1,9 +1,8 @@
1
1
  "use client";
2
- import { Dialog } from '@hanzogui/dialog';
2
+ import { styled, View, Dialog } from '@hanzo/gui';
3
3
  import * as React2 from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
- import { styled, View } from '@hanzogui/core';
7
6
  import { jsx, jsxs } from 'react/jsx-runtime';
8
7
 
9
8
  // src/dialog.tsx
package/dist/drawer.cjs CHANGED
@@ -5,7 +5,7 @@ var RadixDialog = require('@radix-ui/react-dialog');
5
5
  var React2 = require('react');
6
6
  var clsx = require('clsx');
7
7
  var tailwindMerge = require('tailwind-merge');
8
- var core = require('@hanzogui/core');
8
+ var gui = require('@hanzo/gui');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
 
11
11
  function _interopNamespace(e) {
@@ -34,7 +34,7 @@ function cn(...inputs) {
34
34
  return tailwindMerge.twMerge(clsx.clsx(inputs));
35
35
  }
36
36
  var CLOSE_ICON_PATH = "M9.44 8.035a.791.791 0 0 0 1.12 0l3.802-3.803a.791.791 0 0 1 1.119 0l.287.287a.79.79 0 0 1 0 1.119L11.965 9.44a.79.79 0 0 0 0 1.118l3.803 3.803a.791.791 0 0 1 0 1.119l-.287.287a.791.791 0 0 1-1.119 0l-3.803-3.803a.79.79 0 0 0-1.118 0l-3.803 3.803a.79.79 0 0 1-1.119 0l-.287-.287a.791.791 0 0 1 0-1.119l3.803-3.803a.791.791 0 0 0 0-1.118L4.232 5.638a.791.791 0 0 1 0-1.119l.287-.287a.791.791 0 0 1 1.119 0L9.44 8.035Z";
37
- var CloseButtonFrame = core.styled(core.View, {
37
+ var CloseButtonFrame = gui.styled(gui.View, {
38
38
  name: "LuxCloseButton",
39
39
  render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Close" }),
40
40
  role: "button",
package/dist/drawer.js CHANGED
@@ -3,7 +3,7 @@ import * as RadixDialog from '@radix-ui/react-dialog';
3
3
  import * as React2 from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
- import { styled, View } from '@hanzogui/core';
6
+ import { styled, View } from '@hanzo/gui';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
 
9
9
  // src/drawer.tsx
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var core = require('@hanzogui/core');
4
+ var gui = require('@hanzo/gui');
5
5
  var React = require('react');
6
6
  var clsx = require('clsx');
7
7
  var tailwindMerge = require('tailwind-merge');
@@ -218,7 +218,7 @@ React__namespace.forwardRef(
218
218
  )) });
219
219
  }
220
220
  );
221
- var IconButtonFrame = core.styled(core.View, {
221
+ var IconButtonFrame = gui.styled(gui.View, {
222
222
  name: "LuxIconButton",
223
223
  render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
224
224
  role: "button",
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { styled, View } from '@hanzogui/core';
2
+ import { styled, View } from '@hanzo/gui';
3
3
  import * as React from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
package/dist/index.cjs CHANGED
@@ -1,25 +1,23 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var core = require('@hanzogui/core');
4
+ var gui = require('@hanzo/gui');
5
5
  var reactQuery = require('@tanstack/react-query');
6
6
  var React30 = require('react');
7
+ var v5 = require('@hanzogui/config/v5');
7
8
  var jsxRuntime = require('react/jsx-runtime');
8
9
  var clsx = require('clsx');
9
10
  var tailwindMerge = require('tailwind-merge');
10
11
  var AccordionPrimitive = require('@radix-ui/react-accordion');
11
12
  var RadixAvatar = require('@radix-ui/react-avatar');
12
- var tooltip = require('@hanzogui/tooltip');
13
13
  var usehooks = require('@uidotdev/usehooks');
14
14
  var RadixCheckbox = require('@radix-ui/react-checkbox');
15
15
  var Collapsible = require('@radix-ui/react-collapsible');
16
- var dialog = require('@hanzogui/dialog');
17
16
  var RadixDialog = require('@radix-ui/react-dialog');
18
17
  var LabelPrimitive = require('@radix-ui/react-label');
19
18
  var esToolkit = require('es-toolkit');
20
19
  var DropdownMenu = require('@radix-ui/react-dropdown-menu');
21
20
  var lu = require('react-icons/lu');
22
- var popover = require('@hanzogui/popover');
23
21
  var RadixProgress = require('@radix-ui/react-progress');
24
22
  var RadixRadioGroup = require('@radix-ui/react-radio-group');
25
23
  var RadixSelect = require('@radix-ui/react-select');
@@ -62,21 +60,70 @@ var RadixSwitch__namespace = /*#__PURE__*/_interopNamespace(RadixSwitch);
62
60
  var RadixTabs__namespace = /*#__PURE__*/_interopNamespace(RadixTabs);
63
61
 
64
62
  // src/provider.tsx
65
- var _guiInitialized = false;
66
- function ensureGui() {
67
- if (_guiInitialized) return;
68
- if (typeof window === "undefined") return;
69
- core.createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
70
- _guiInitialized = true;
71
- }
63
+ var LUX_BRAND = {
64
+ lux: "#7000FF",
65
+ zoo: "#6C5EFB",
66
+ hanzo: "#EA580C",
67
+ pars: "#1C3879"
68
+ };
69
+ var PARS_GOLD = "#C8A45C";
70
+ var TRUE_BLACK = "#000000";
71
+ var darkBase = {
72
+ ...v5.defaultConfig.themes.dark,
73
+ background: TRUE_BLACK,
74
+ backgroundHover: "#0A0A0A",
75
+ backgroundPress: "#141414",
76
+ backgroundFocus: "#0A0A0A"
77
+ };
78
+ var brandTheme = (accent, extra = {}) => ({
79
+ ...darkBase,
80
+ accentBackground: accent,
81
+ accentColor: "#FFFFFF",
82
+ borderColorHover: accent,
83
+ colorHover: accent,
84
+ ...extra
85
+ });
86
+ var luxThemes = {
87
+ dark: darkBase,
88
+ dark_lux: brandTheme(LUX_BRAND.lux),
89
+ dark_zoo: brandTheme(LUX_BRAND.zoo),
90
+ dark_hanzo: brandTheme(LUX_BRAND.hanzo),
91
+ dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD })
92
+ };
93
+ var config = gui.createGui({
94
+ ...v5.defaultConfig,
95
+ settings: {
96
+ ...v5.defaultConfig.settings,
97
+ onlyAllowShorthands: false
98
+ },
99
+ themes: {
100
+ ...v5.defaultConfig.themes,
101
+ ...luxThemes
102
+ }
103
+ });
104
+ var lux_config_default = config;
72
105
  var defaultQueryClient = new reactQuery.QueryClient({
73
106
  defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
74
107
  });
75
- var AppProvider = ({ children, queryClient }) => {
76
- React30__namespace.default.useEffect(() => {
77
- ensureGui();
108
+ var FONT_BODY_RESET_ID = "lux-ui-font-body-reset";
109
+ var FONT_BODY_RESET_CSS = "body .font_body{line-height:1.5}";
110
+ var useFontBodyReset = () => {
111
+ React30__namespace.default.useInsertionEffect(() => {
112
+ if (typeof document === "undefined") return;
113
+ if (document.getElementById(FONT_BODY_RESET_ID)) return;
114
+ const style = document.createElement("style");
115
+ style.id = FONT_BODY_RESET_ID;
116
+ style.textContent = FONT_BODY_RESET_CSS;
117
+ document.head.appendChild(style);
78
118
  }, []);
79
- return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
119
+ };
120
+ var AppProvider = ({
121
+ children,
122
+ queryClient,
123
+ defaultTheme = "dark_lux"
124
+ }) => {
125
+ useFontBodyReset();
126
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.GuiProvider, { config: lux_config_default, defaultTheme, children: /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient ?? defaultQueryClient, children }) });
80
127
  };
81
128
  function cn(...inputs) {
82
129
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -255,7 +302,7 @@ function useAccordion(items) {
255
302
  }, [value, onValueChange, scrollToItemFromUrl]);
256
303
  }
257
304
  var CLOSE_ICON_PATH = "M9.44 8.035a.791.791 0 0 0 1.12 0l3.802-3.803a.791.791 0 0 1 1.119 0l.287.287a.79.79 0 0 1 0 1.119L11.965 9.44a.79.79 0 0 0 0 1.118l3.803 3.803a.791.791 0 0 1 0 1.119l-.287.287a.791.791 0 0 1-1.119 0l-3.803-3.803a.79.79 0 0 0-1.118 0l-3.803 3.803a.79.79 0 0 1-1.119 0l-.287-.287a.791.791 0 0 1 0-1.119l3.803-3.803a.791.791 0 0 0 0-1.118L4.232 5.638a.791.791 0 0 1 0-1.119l.287-.287a.791.791 0 0 1 1.119 0L9.44 8.035Z";
258
- var CloseButtonFrame = core.styled(core.View, {
305
+ var CloseButtonFrame = gui.styled(gui.View, {
259
306
  name: "LuxCloseButton",
260
307
  render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Close" }),
261
308
  role: "button",
@@ -815,8 +862,8 @@ var Tooltip = React30__namespace.forwardRef(
815
862
  const isPopover = variant === "popover";
816
863
  const placement = mapPlacement(positioning?.placement) ?? "top";
817
864
  const offset = positioning?.offset?.mainAxis ?? 4;
818
- return /* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipGroup, { delay: openDelay, children: /* @__PURE__ */ jsxRuntime.jsxs(
819
- tooltip.Tooltip,
865
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.TooltipGroup, { delay: openDelay, children: /* @__PURE__ */ jsxRuntime.jsxs(
866
+ gui.Tooltip,
820
867
  {
821
868
  open,
822
869
  onOpenChange: handleOpenChange,
@@ -826,7 +873,7 @@ var Tooltip = React30__namespace.forwardRef(
826
873
  unstyled: true,
827
874
  children: [
828
875
  /* @__PURE__ */ jsxRuntime.jsx(
829
- tooltip.Tooltip.Trigger,
876
+ gui.Tooltip.Trigger,
830
877
  {
831
878
  ref: open ? triggerRef : void 0,
832
879
  asChild: true,
@@ -836,7 +883,7 @@ var Tooltip = React30__namespace.forwardRef(
836
883
  }
837
884
  ),
838
885
  /* @__PURE__ */ jsxRuntime.jsxs(
839
- tooltip.Tooltip.Content,
886
+ gui.Tooltip.Content,
840
887
  {
841
888
  ref,
842
889
  unstyled: true,
@@ -853,7 +900,7 @@ var Tooltip = React30__namespace.forwardRef(
853
900
  ...contentProps,
854
901
  children: [
855
902
  showArrow && /* @__PURE__ */ jsxRuntime.jsx(
856
- tooltip.Tooltip.Arrow,
903
+ gui.Tooltip.Arrow,
857
904
  {
858
905
  unstyled: true,
859
906
  className: cn(
@@ -963,7 +1010,7 @@ var Badge = React30__namespace.default.forwardRef(
963
1010
  return badgeElement;
964
1011
  }
965
1012
  );
966
- var SpinnerFrame = core.styled(core.View, {
1013
+ var SpinnerFrame = gui.styled(gui.View, {
967
1014
  name: "ButtonSpinner",
968
1015
  render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
969
1016
  width: 16,
@@ -987,7 +1034,7 @@ function Spinner({ className }) {
987
1034
  }
988
1035
  );
989
1036
  }
990
- var ButtonFrame = core.styled(core.View, {
1037
+ var ButtonFrame = gui.styled(gui.View, {
991
1038
  name: "LuxButton",
992
1039
  render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
993
1040
  role: "button",
@@ -1995,7 +2042,7 @@ var DialogRoot = ({
1995
2042
  );
1996
2043
  const ctx = React30__namespace.useMemo(() => ({ size }), [size]);
1997
2044
  return /* @__PURE__ */ jsxRuntime.jsx(DialogSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
1998
- dialog.Dialog,
2045
+ gui.Dialog,
1999
2046
  {
2000
2047
  open,
2001
2048
  defaultOpen,
@@ -2021,9 +2068,9 @@ var DialogContent = React30__namespace.forwardRef(function DialogContent2(props,
2021
2068
  ..._paddingTop !== void 0 ? { paddingTop: typeof _paddingTop === "number" ? `${_paddingTop * 4}px` : _paddingTop } : {}
2022
2069
  };
2023
2070
  const { size } = useDialogSizeContext();
2024
- return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
2071
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.Dialog.Portal, { children: [
2025
2072
  backdrop && /* @__PURE__ */ jsxRuntime.jsx(
2026
- dialog.Dialog.Overlay,
2073
+ gui.Dialog.Overlay,
2027
2074
  {
2028
2075
  unstyled: true,
2029
2076
  className: "fixed inset-0 z-[1400] bg-black/80"
@@ -2038,7 +2085,7 @@ var DialogContent = React30__namespace.forwardRef(function DialogContent2(props,
2038
2085
  "overflow-hidden"
2039
2086
  ),
2040
2087
  children: /* @__PURE__ */ jsxRuntime.jsx(
2041
- dialog.Dialog.Content,
2088
+ gui.Dialog.Content,
2042
2089
  {
2043
2090
  ref,
2044
2091
  unstyled: true,
@@ -2064,7 +2111,7 @@ var DialogContent = React30__namespace.forwardRef(function DialogContent2(props,
2064
2111
  });
2065
2112
  var DialogCloseTrigger = React30__namespace.forwardRef(function DialogCloseTrigger2(props, ref) {
2066
2113
  const { className, ...rest } = props;
2067
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { ref, className, ...rest, children: props.children }) });
2114
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { ref, className, ...rest, children: props.children }) });
2068
2115
  });
2069
2116
  var DialogHeader = React30__namespace.forwardRef(function DialogHeader2(props, ref) {
2070
2117
  const { startElement: startElementProp, onBackToClick, className, children, ...rest } = props;
@@ -2081,7 +2128,7 @@ var DialogHeader = React30__namespace.forwardRef(function DialogHeader2(props, r
2081
2128
  children: [
2082
2129
  startElement,
2083
2130
  /* @__PURE__ */ jsxRuntime.jsx(
2084
- dialog.Dialog.Title,
2131
+ gui.Dialog.Title,
2085
2132
  {
2086
2133
  unstyled: true,
2087
2134
  className: cn(
@@ -2123,11 +2170,11 @@ var DialogFooter = React30__namespace.forwardRef(function DialogFooter2({ classN
2123
2170
  }
2124
2171
  );
2125
2172
  });
2126
- var DialogBackdrop = dialog.Dialog.Overlay;
2127
- var DialogTitle = dialog.Dialog.Title;
2128
- var DialogDescription = dialog.Dialog.Description;
2129
- var DialogTrigger = dialog.Dialog.Trigger;
2130
- var DialogActionTrigger = dialog.Dialog.Close;
2173
+ var DialogBackdrop = gui.Dialog.Overlay;
2174
+ var DialogTitle = gui.Dialog.Title;
2175
+ var DialogDescription = gui.Dialog.Description;
2176
+ var DialogTrigger = gui.Dialog.Trigger;
2177
+ var DialogActionTrigger = gui.Dialog.Close;
2131
2178
  var DrawerPlacementContext = React30__namespace.createContext("right");
2132
2179
  var DrawerSizeContext = React30__namespace.createContext("md");
2133
2180
  var DrawerRoot = (props) => {
@@ -2480,7 +2527,7 @@ var Heading = React30__namespace.default.forwardRef(
2480
2527
  );
2481
2528
  }
2482
2529
  );
2483
- var IconButtonFrame = core.styled(core.View, {
2530
+ var IconButtonFrame = gui.styled(gui.View, {
2484
2531
  name: "LuxIconButton",
2485
2532
  render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
2486
2533
  role: "button",
@@ -2853,13 +2900,21 @@ var INPUT_VARIANT_CLASSES = {
2853
2900
  unstyled: "border-0 bg-transparent p-0 h-auto"
2854
2901
  };
2855
2902
  var Input = React30__namespace.default.forwardRef(
2856
- ({ size = "md", variant = "outline", className, ...rest }, ref) => {
2903
+ ({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
2904
+ const handleChange = React30__namespace.default.useCallback(
2905
+ (event) => {
2906
+ onChange?.(event);
2907
+ onChangeText?.(event.target.value);
2908
+ },
2909
+ [onChange, onChangeText]
2910
+ );
2857
2911
  return /* @__PURE__ */ jsxRuntime.jsx(
2858
2912
  "input",
2859
2913
  {
2860
2914
  ref,
2861
2915
  className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
2862
- ...rest
2916
+ ...rest,
2917
+ onChange: handleChange
2863
2918
  }
2864
2919
  );
2865
2920
  }
@@ -3461,7 +3516,7 @@ var PopoverRoot = (props) => {
3461
3516
  const placement = mergedPositioning.placement ?? "bottom-start";
3462
3517
  const offset = mergedPositioning.offset?.mainAxis ?? 4;
3463
3518
  return /* @__PURE__ */ jsxRuntime.jsx(PositioningContext2.Provider, { value: positioningValue, children: /* @__PURE__ */ jsxRuntime.jsx(
3464
- popover.Popover,
3519
+ gui.Popover,
3465
3520
  {
3466
3521
  open,
3467
3522
  defaultOpen,
@@ -3475,7 +3530,7 @@ var PopoverRoot = (props) => {
3475
3530
  };
3476
3531
  var PopoverTrigger = React30__namespace.forwardRef(function PopoverTrigger2(props, ref) {
3477
3532
  const { asChild = true, ...rest } = props;
3478
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Trigger, { asChild: asChild ? "except-style" : void 0, ref, ...rest });
3533
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Trigger, { asChild: asChild ? "except-style" : void 0, ref, ...rest });
3479
3534
  });
3480
3535
  var PopoverContent = React30__namespace.forwardRef(function PopoverContent2(props, ref) {
3481
3536
  const { portalled = true, portalRef: _portalRef, className, w, minW, maxW, paddingTop, style: styleProp, ...rest } = props;
@@ -3488,7 +3543,7 @@ var PopoverContent = React30__namespace.forwardRef(function PopoverContent2(prop
3488
3543
  ...paddingTop !== void 0 ? { paddingTop: typeof paddingTop === "number" ? `${paddingTop * 4}px` : paddingTop } : {}
3489
3544
  };
3490
3545
  return /* @__PURE__ */ jsxRuntime.jsx(
3491
- popover.Popover.Content,
3546
+ gui.Popover.Content,
3492
3547
  {
3493
3548
  ref,
3494
3549
  unstyled: true,
@@ -3511,7 +3566,7 @@ var PopoverContent = React30__namespace.forwardRef(function PopoverContent2(prop
3511
3566
  var PopoverArrow = React30__namespace.forwardRef(function PopoverArrow2(props, ref) {
3512
3567
  const { className, ...rest } = props;
3513
3568
  return /* @__PURE__ */ jsxRuntime.jsx(
3514
- popover.Popover.Arrow,
3569
+ gui.Popover.Arrow,
3515
3570
  {
3516
3571
  ref,
3517
3572
  unstyled: true,
@@ -3523,7 +3578,7 @@ var PopoverArrow = React30__namespace.forwardRef(function PopoverArrow2(props, r
3523
3578
  var PopoverCloseTrigger = React30__namespace.forwardRef(function PopoverCloseTrigger2(props, ref) {
3524
3579
  const { className, ...rest } = props;
3525
3580
  return /* @__PURE__ */ jsxRuntime.jsx(
3526
- popover.Popover.Close,
3581
+ gui.Popover.Close,
3527
3582
  {
3528
3583
  unstyled: true,
3529
3584
  className: cn("absolute top-1 right-1", className),
@@ -3539,7 +3594,7 @@ var PopoverCloseTriggerWrapper = React30__namespace.forwardRef(function PopoverC
3539
3594
  if (disabled) {
3540
3595
  return children;
3541
3596
  }
3542
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Close, { ref, ...rest, asChild: true, children });
3597
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Close, { ref, ...rest, asChild: true, children });
3543
3598
  });
3544
3599
  var PopoverBody = React30__namespace.forwardRef(function PopoverBody2(props, ref) {
3545
3600
  const {
@@ -4006,8 +4061,8 @@ var Rating = React30__namespace.forwardRef(
4006
4061
  ] });
4007
4062
  }
4008
4063
  );
4009
- function createListCollection(config) {
4010
- return { items: config.items };
4064
+ function createListCollection(config2) {
4065
+ return { items: config2.items };
4011
4066
  }
4012
4067
  var ArrowIcon2 = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
4013
4068
  var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.667 5L7.5 14.167 3.333 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
@@ -5401,13 +5456,21 @@ var TEXTAREA_VARIANT_CLASSES = {
5401
5456
  unstyled: "border-0 bg-transparent p-0"
5402
5457
  };
5403
5458
  var Textarea = React30__namespace.default.forwardRef(
5404
- ({ size = "md", variant = "outline", className, ...rest }, ref) => {
5459
+ ({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
5460
+ const handleChange = React30__namespace.default.useCallback(
5461
+ (event) => {
5462
+ onChange?.(event);
5463
+ onChangeText?.(event.target.value);
5464
+ },
5465
+ [onChange, onChangeText]
5466
+ );
5405
5467
  return /* @__PURE__ */ jsxRuntime.jsx(
5406
5468
  "textarea",
5407
5469
  {
5408
5470
  ref,
5409
5471
  className: cn(TEXTAREA_BASE, TEXTAREA_SIZE_CLASSES[size], TEXTAREA_VARIANT_CLASSES[variant], className),
5410
- ...rest
5472
+ ...rest,
5473
+ onChange: handleChange
5411
5474
  }
5412
5475
  );
5413
5476
  }
@@ -6791,7 +6854,7 @@ var bankColors = {
6791
6854
  divider: "#222222",
6792
6855
  disabled: "#444444"
6793
6856
  };
6794
- var BankCard = core.styled(core.View, {
6857
+ var BankCard = gui.styled(gui.View, {
6795
6858
  name: "BankCard",
6796
6859
  backgroundColor: bankColors.card,
6797
6860
  borderRadius: 24,
@@ -6812,7 +6875,7 @@ var BankCard = core.styled(core.View, {
6812
6875
  size: "md"
6813
6876
  }
6814
6877
  });
6815
- var BankInput = core.styled(core.Text, {
6878
+ var BankInput = gui.styled(gui.Text, {
6816
6879
  name: "BankInput",
6817
6880
  render: "input",
6818
6881
  backgroundColor: bankColors.input,
@@ -6848,7 +6911,7 @@ var BankInput = core.styled(core.Text, {
6848
6911
  size: "md"
6849
6912
  }
6850
6913
  });
6851
- var BankButton = core.styled(core.View, {
6914
+ var BankButton = gui.styled(gui.View, {
6852
6915
  name: "BankButton",
6853
6916
  render: "button",
6854
6917
  backgroundColor: bankColors.accent,
@@ -6893,7 +6956,7 @@ var BankButton = core.styled(core.View, {
6893
6956
  variant: "primary"
6894
6957
  }
6895
6958
  });
6896
- var BankButtonText = core.styled(core.Text, {
6959
+ var BankButtonText = gui.styled(gui.Text, {
6897
6960
  name: "BankButtonText",
6898
6961
  color: "#000000",
6899
6962
  fontSize: 16,
@@ -6907,7 +6970,7 @@ var BankButtonText = core.styled(core.Text, {
6907
6970
  }
6908
6971
  }
6909
6972
  });
6910
- var BankHeading = core.styled(core.Text, {
6973
+ var BankHeading = gui.styled(gui.Text, {
6911
6974
  name: "BankHeading",
6912
6975
  color: bankColors.text,
6913
6976
  fontWeight: "700",
@@ -6924,7 +6987,7 @@ var BankHeading = core.styled(core.Text, {
6924
6987
  size: "lg"
6925
6988
  }
6926
6989
  });
6927
- var BankText = core.styled(core.Text, {
6990
+ var BankText = gui.styled(gui.Text, {
6928
6991
  name: "BankText",
6929
6992
  color: bankColors.textMuted,
6930
6993
  fontSize: 16,
@@ -6948,13 +7011,13 @@ function BankField({
6948
7011
  error,
6949
7012
  children
6950
7013
  }) {
6951
- return /* @__PURE__ */ jsxRuntime.jsxs(core.View, { gap: 8, width: "100%", children: [
7014
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { gap: 8, width: "100%", children: [
6952
7015
  label && /* @__PURE__ */ jsxRuntime.jsx(BankText, { variant: "label", children: label }),
6953
7016
  children,
6954
7017
  error && /* @__PURE__ */ jsxRuntime.jsx(BankText, { variant: "error", children: error })
6955
7018
  ] });
6956
7019
  }
6957
- var BankAlert = core.styled(core.View, {
7020
+ var BankAlert = gui.styled(gui.View, {
6958
7021
  name: "BankAlert",
6959
7022
  borderRadius: 12,
6960
7023
  padding: 16,
@@ -6973,7 +7036,7 @@ var BankAlert = core.styled(core.View, {
6973
7036
  }
6974
7037
  }
6975
7038
  });
6976
- var BankAlertText = core.styled(core.Text, {
7039
+ var BankAlertText = gui.styled(gui.Text, {
6977
7040
  name: "BankAlertText",
6978
7041
  fontSize: 14,
6979
7042
  variants: {
@@ -6983,7 +7046,7 @@ var BankAlertText = core.styled(core.Text, {
6983
7046
  }
6984
7047
  }
6985
7048
  });
6986
- var BankPinBox = core.styled(core.Text, {
7049
+ var BankPinBox = gui.styled(gui.Text, {
6987
7050
  name: "BankPinBox",
6988
7051
  render: "input",
6989
7052
  backgroundColor: bankColors.input,
@@ -7006,13 +7069,13 @@ var BankPinBox = core.styled(core.Text, {
7006
7069
  }
7007
7070
  }
7008
7071
  });
7009
- var BankDivider = core.styled(core.View, {
7072
+ var BankDivider = gui.styled(gui.View, {
7010
7073
  name: "BankDivider",
7011
7074
  height: 1,
7012
7075
  width: "100%",
7013
7076
  backgroundColor: bankColors.divider
7014
7077
  });
7015
- var BankPage = core.styled(core.View, {
7078
+ var BankPage = gui.styled(gui.View, {
7016
7079
  name: "BankPage",
7017
7080
  backgroundColor: bankColors.bg,
7018
7081
  minHeight: "100vh",
@@ -7081,6 +7144,7 @@ exports.IconButton = IconButton;
7081
7144
  exports.Image = Image2;
7082
7145
  exports.Input = Input;
7083
7146
  exports.InputGroup = InputGroup;
7147
+ exports.LUX_BRAND = LUX_BRAND;
7084
7148
  exports.Link = Link;
7085
7149
  exports.LinkBox = LinkBox;
7086
7150
  exports.LinkExternalIcon = LinkExternalIcon;
@@ -7099,6 +7163,7 @@ exports.MenuTrigger = MenuTrigger;
7099
7163
  exports.MenuTriggerItem = MenuTriggerItem;
7100
7164
  exports.OptionChain = OptionChain;
7101
7165
  exports.OptionPositionCard = OptionPositionCard;
7166
+ exports.PARS_GOLD = PARS_GOLD;
7102
7167
  exports.PinInput = PinInput;
7103
7168
  exports.PnlDiagram = PnlDiagram;
7104
7169
  exports.PopoverArrow = PopoverArrow;
@@ -7160,7 +7225,10 @@ exports.Tooltip = Tooltip;
7160
7225
  exports.bankColors = bankColors;
7161
7226
  exports.buttonVariants = buttonVariants;
7162
7227
  exports.cn = cn;
7228
+ exports.config = config;
7163
7229
  exports.createListCollection = createListCollection;
7230
+ exports.guiConfig = lux_config_default;
7231
+ exports.luxThemes = luxThemes;
7164
7232
  exports.toaster = toaster;
7165
7233
  exports.useAccordion = useAccordion;
7166
7234
  exports.useColorMode = useColorMode;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { AppProvider } from './provider.cjs';
2
2
  export { cn } from './utils.cjs';
3
+ export { Conf, LUX_BRAND, LuxBrand, PARS_GOLD, default as config, default as guiConfig, luxThemes } from './lux.config.cjs';
3
4
  export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, useAccordion } from './accordion.cjs';
4
5
  export { Alert, AlertProps } from './alert.cjs';
5
6
  export { Avatar, AvatarGroup, AvatarProps } from './avatar.cjs';
@@ -44,13 +45,16 @@ export { PnlDiagram, PnlDiagramProps } from './pnl-diagram.cjs';
44
45
  export { OptionPosition, OptionPositionCard, OptionPositionCardProps } from './option-position.cjs';
45
46
  export { ExpirationOption, ExpirationSelector, ExpirationSelectorProps } from './expiration-selector.cjs';
46
47
  export { BankAlert, BankAlertProps, BankAlertText, BankButton, BankButtonProps, BankButtonText, BankCard, BankCardProps, BankDivider, BankField, BankHeading, BankHeadingProps, BankInput, BankInputProps, BankPage, BankPageProps, BankPinBox, BankPinBoxProps, BankText, BankTextProps, bankColors } from './bank.cjs';
47
- import 'react/jsx-runtime';
48
48
  import '@tanstack/react-query';
49
49
  import 'react';
50
50
  import 'clsx';
51
+ import '@hanzogui/web';
52
+ import '@hanzogui/themes/v5';
51
53
  import '@radix-ui/react-accordion';
52
54
  import '@radix-ui/react-checkbox';
55
+ import 'react/jsx-runtime';
56
+ import '@hanzo/gui';
57
+ import '@hanzogui/core';
53
58
  import '@radix-ui/react-dialog';
54
59
  import '@radix-ui/react-select';
55
60
  import '@radix-ui/react-tabs';
56
- import '@hanzogui/core';