@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.
- package/dist/alert.cjs +2 -2
- package/dist/alert.js +1 -1
- package/dist/badge.cjs +6 -6
- package/dist/badge.js +1 -1
- package/dist/bank.cjs +13 -13
- package/dist/bank.d.cts +30 -23
- package/dist/bank.d.ts +30 -23
- package/dist/bank.js +1 -1
- package/dist/button.cjs +3 -3
- package/dist/button.js +1 -1
- package/dist/close-button.cjs +2 -2
- package/dist/close-button.js +1 -1
- package/dist/dialog.cjs +13 -14
- package/dist/dialog.d.cts +58 -5
- package/dist/dialog.d.ts +58 -5
- package/dist/dialog.js +1 -2
- package/dist/drawer.cjs +2 -2
- package/dist/drawer.js +1 -1
- package/dist/icon-button.cjs +2 -2
- package/dist/icon-button.js +1 -1
- package/dist/index.cjs +127 -59
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +85 -22
- package/dist/input.cjs +10 -2
- package/dist/input.d.cts +8 -0
- package/dist/input.d.ts +8 -0
- package/dist/input.js +10 -2
- package/dist/lux.config.cjs +56 -0
- package/dist/lux.config.d.cts +415 -0
- package/dist/lux.config.d.ts +415 -0
- package/dist/lux.config.js +48 -0
- package/dist/popover.cjs +8 -9
- package/dist/popover.js +1 -2
- package/dist/provider.cjs +62 -12
- package/dist/provider.d.cts +3 -2
- package/dist/provider.d.ts +3 -2
- package/dist/provider.js +62 -12
- package/dist/tag.cjs +7 -8
- package/dist/tag.js +1 -2
- package/dist/textarea.cjs +10 -2
- package/dist/textarea.d.cts +2 -0
- package/dist/textarea.d.ts +2 -0
- package/dist/textarea.js +10 -2
- package/dist/tooltip.cjs +6 -6
- package/dist/tooltip.js +1 -1
- package/package.json +24 -12
- package/src/bank.tsx +2 -2
- package/src/button.tsx +1 -1
- package/src/close-button.tsx +1 -1
- package/src/dialog.tsx +1 -1
- package/src/icon-button.tsx +1 -1
- package/src/index.ts +6 -0
- package/src/input.tsx +17 -1
- package/src/lux.config.ts +81 -0
- package/src/popover.tsx +1 -1
- package/src/provider.tsx +51 -15
- package/src/textarea.tsx +11 -1
- package/src/tooltip.tsx +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { AppProvider } from './provider.js';
|
|
2
2
|
export { cn } from './utils.js';
|
|
3
|
+
export { Conf, LUX_BRAND, LuxBrand, PARS_GOLD, default as config, default as guiConfig, luxThemes } from './lux.config.js';
|
|
3
4
|
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, useAccordion } from './accordion.js';
|
|
4
5
|
export { Alert, AlertProps } from './alert.js';
|
|
5
6
|
export { Avatar, AvatarGroup, AvatarProps } from './avatar.js';
|
|
@@ -44,13 +45,16 @@ export { PnlDiagram, PnlDiagramProps } from './pnl-diagram.js';
|
|
|
44
45
|
export { OptionPosition, OptionPositionCard, OptionPositionCardProps } from './option-position.js';
|
|
45
46
|
export { ExpirationOption, ExpirationSelector, ExpirationSelectorProps } from './expiration-selector.js';
|
|
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.js';
|
|
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';
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { styled, View, Text,
|
|
2
|
+
import { createGui, styled, View, TooltipGroup, Tooltip as Tooltip$1, Dialog, Popover, Text, GuiProvider } from '@hanzo/gui';
|
|
3
3
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
4
4
|
import * as React30 from 'react';
|
|
5
5
|
import React30__default from 'react';
|
|
6
|
+
import { defaultConfig } from '@hanzogui/config/v5';
|
|
6
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
import { clsx } from 'clsx';
|
|
8
9
|
import { twMerge } from 'tailwind-merge';
|
|
9
10
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
10
11
|
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
11
|
-
import { TooltipGroup, Tooltip as Tooltip$1 } from '@hanzogui/tooltip';
|
|
12
12
|
import { useClickAway, useDebounce } from '@uidotdev/usehooks';
|
|
13
13
|
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
14
14
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
15
|
-
import { Dialog } from '@hanzogui/dialog';
|
|
16
15
|
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
17
16
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
18
17
|
import { debounce, throttle } from 'es-toolkit';
|
|
19
18
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
20
19
|
import { LuCheck, LuChevronRight } from 'react-icons/lu';
|
|
21
|
-
import { Popover } from '@hanzogui/popover';
|
|
22
20
|
import * as RadixProgress from '@radix-ui/react-progress';
|
|
23
21
|
import * as RadixRadioGroup from '@radix-ui/react-radio-group';
|
|
24
22
|
import * as RadixSelect from '@radix-ui/react-select';
|
|
@@ -28,21 +26,70 @@ import * as RadixTabs from '@radix-ui/react-tabs';
|
|
|
28
26
|
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
29
27
|
|
|
30
28
|
// src/provider.tsx
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
var LUX_BRAND = {
|
|
30
|
+
lux: "#7000FF",
|
|
31
|
+
zoo: "#6C5EFB",
|
|
32
|
+
hanzo: "#EA580C",
|
|
33
|
+
pars: "#1C3879"
|
|
34
|
+
};
|
|
35
|
+
var PARS_GOLD = "#C8A45C";
|
|
36
|
+
var TRUE_BLACK = "#000000";
|
|
37
|
+
var darkBase = {
|
|
38
|
+
...defaultConfig.themes.dark,
|
|
39
|
+
background: TRUE_BLACK,
|
|
40
|
+
backgroundHover: "#0A0A0A",
|
|
41
|
+
backgroundPress: "#141414",
|
|
42
|
+
backgroundFocus: "#0A0A0A"
|
|
43
|
+
};
|
|
44
|
+
var brandTheme = (accent, extra = {}) => ({
|
|
45
|
+
...darkBase,
|
|
46
|
+
accentBackground: accent,
|
|
47
|
+
accentColor: "#FFFFFF",
|
|
48
|
+
borderColorHover: accent,
|
|
49
|
+
colorHover: accent,
|
|
50
|
+
...extra
|
|
51
|
+
});
|
|
52
|
+
var luxThemes = {
|
|
53
|
+
dark: darkBase,
|
|
54
|
+
dark_lux: brandTheme(LUX_BRAND.lux),
|
|
55
|
+
dark_zoo: brandTheme(LUX_BRAND.zoo),
|
|
56
|
+
dark_hanzo: brandTheme(LUX_BRAND.hanzo),
|
|
57
|
+
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD })
|
|
58
|
+
};
|
|
59
|
+
var config = createGui({
|
|
60
|
+
...defaultConfig,
|
|
61
|
+
settings: {
|
|
62
|
+
...defaultConfig.settings,
|
|
63
|
+
onlyAllowShorthands: false
|
|
64
|
+
},
|
|
65
|
+
themes: {
|
|
66
|
+
...defaultConfig.themes,
|
|
67
|
+
...luxThemes
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var lux_config_default = config;
|
|
38
71
|
var defaultQueryClient = new QueryClient({
|
|
39
72
|
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
40
73
|
});
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
74
|
+
var FONT_BODY_RESET_ID = "lux-ui-font-body-reset";
|
|
75
|
+
var FONT_BODY_RESET_CSS = "body .font_body{line-height:1.5}";
|
|
76
|
+
var useFontBodyReset = () => {
|
|
77
|
+
React30__default.useInsertionEffect(() => {
|
|
78
|
+
if (typeof document === "undefined") return;
|
|
79
|
+
if (document.getElementById(FONT_BODY_RESET_ID)) return;
|
|
80
|
+
const style = document.createElement("style");
|
|
81
|
+
style.id = FONT_BODY_RESET_ID;
|
|
82
|
+
style.textContent = FONT_BODY_RESET_CSS;
|
|
83
|
+
document.head.appendChild(style);
|
|
44
84
|
}, []);
|
|
45
|
-
|
|
85
|
+
};
|
|
86
|
+
var AppProvider = ({
|
|
87
|
+
children,
|
|
88
|
+
queryClient,
|
|
89
|
+
defaultTheme = "dark_lux"
|
|
90
|
+
}) => {
|
|
91
|
+
useFontBodyReset();
|
|
92
|
+
return /* @__PURE__ */ jsx(GuiProvider, { config: lux_config_default, defaultTheme, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient ?? defaultQueryClient, children }) });
|
|
46
93
|
};
|
|
47
94
|
function cn(...inputs) {
|
|
48
95
|
return twMerge(clsx(inputs));
|
|
@@ -2819,13 +2866,21 @@ var INPUT_VARIANT_CLASSES = {
|
|
|
2819
2866
|
unstyled: "border-0 bg-transparent p-0 h-auto"
|
|
2820
2867
|
};
|
|
2821
2868
|
var Input = React30__default.forwardRef(
|
|
2822
|
-
({ size = "md", variant = "outline", className, ...rest }, ref) => {
|
|
2869
|
+
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
2870
|
+
const handleChange = React30__default.useCallback(
|
|
2871
|
+
(event) => {
|
|
2872
|
+
onChange?.(event);
|
|
2873
|
+
onChangeText?.(event.target.value);
|
|
2874
|
+
},
|
|
2875
|
+
[onChange, onChangeText]
|
|
2876
|
+
);
|
|
2823
2877
|
return /* @__PURE__ */ jsx(
|
|
2824
2878
|
"input",
|
|
2825
2879
|
{
|
|
2826
2880
|
ref,
|
|
2827
2881
|
className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
|
|
2828
|
-
...rest
|
|
2882
|
+
...rest,
|
|
2883
|
+
onChange: handleChange
|
|
2829
2884
|
}
|
|
2830
2885
|
);
|
|
2831
2886
|
}
|
|
@@ -3972,8 +4027,8 @@ var Rating = React30.forwardRef(
|
|
|
3972
4027
|
] });
|
|
3973
4028
|
}
|
|
3974
4029
|
);
|
|
3975
|
-
function createListCollection(
|
|
3976
|
-
return { items:
|
|
4030
|
+
function createListCollection(config2) {
|
|
4031
|
+
return { items: config2.items };
|
|
3977
4032
|
}
|
|
3978
4033
|
var ArrowIcon2 = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
3979
4034
|
var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M16.667 5L7.5 14.167 3.333 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
@@ -5367,13 +5422,21 @@ var TEXTAREA_VARIANT_CLASSES = {
|
|
|
5367
5422
|
unstyled: "border-0 bg-transparent p-0"
|
|
5368
5423
|
};
|
|
5369
5424
|
var Textarea = React30__default.forwardRef(
|
|
5370
|
-
({ size = "md", variant = "outline", className, ...rest }, ref) => {
|
|
5425
|
+
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
5426
|
+
const handleChange = React30__default.useCallback(
|
|
5427
|
+
(event) => {
|
|
5428
|
+
onChange?.(event);
|
|
5429
|
+
onChangeText?.(event.target.value);
|
|
5430
|
+
},
|
|
5431
|
+
[onChange, onChangeText]
|
|
5432
|
+
);
|
|
5371
5433
|
return /* @__PURE__ */ jsx(
|
|
5372
5434
|
"textarea",
|
|
5373
5435
|
{
|
|
5374
5436
|
ref,
|
|
5375
5437
|
className: cn(TEXTAREA_BASE, TEXTAREA_SIZE_CLASSES[size], TEXTAREA_VARIANT_CLASSES[variant], className),
|
|
5376
|
-
...rest
|
|
5438
|
+
...rest,
|
|
5439
|
+
onChange: handleChange
|
|
5377
5440
|
}
|
|
5378
5441
|
);
|
|
5379
5442
|
}
|
|
@@ -6987,4 +7050,4 @@ var BankPage = styled(View, {
|
|
|
6987
7050
|
padding: 16
|
|
6988
7051
|
});
|
|
6989
7052
|
|
|
6990
|
-
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, Alert, AppProvider, Avatar, AvatarGroup, Badge, BankAlert, BankAlertText, BankButton, BankButtonText, BankCard, BankDivider, BankField, BankHeading, BankInput, BankPage, BankPinBox, BankText, Button, ButtonGroup, ButtonGroupRadio, Checkbox2 as Checkbox, CheckboxGroup2 as CheckboxGroup, CloseButton, CollapsibleDetails, CollapsibleList, ColorModeProvider, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, DrawerActionTrigger, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger, EmptyState, ExpirationSelector, Field, GreeksDisplay, Heading, IconButton, Image2 as Image, Input, InputGroup, Link, LinkBox, LinkExternalIcon, LinkOverlay, MenuArrow, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuItemText, MenuRadioItem, MenuRadioItemGroup, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, OptionChain, OptionPositionCard, PinInput, PnlDiagram, PopoverArrow, PopoverBody, PopoverCloseTrigger, PopoverCloseTriggerWrapper, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger, Progress, ProgressCircleRing, ProgressCircleRoot, ProgressCircleValueText, Radio2 as Radio, RadioGroup3 as RadioGroup, Rating, Select, SelectAsync, SelectClearTrigger, SelectContent, SelectControl, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectValueText, Separator2 as Separator, Skeleton, SkeletonCircle, SkeletonText, Slider, StrategyBuilder, Switch2 as Switch, TableBody, TableCaption, TableCell, TableColumnHeader, TableColumnHeaderSortable, TableFooter, TableHeader, TableHeaderSticky, TableRoot, TableRow, TableScrollWrapper, TabsContent, TabsCounter, TabsList, TabsRoot, TabsTrigger, Tag, Textarea, Toaster, Tooltip, bankColors, buttonVariants, cn, createListCollection, toaster, useAccordion, useColorMode, useColorModeValue };
|
|
7053
|
+
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, Alert, AppProvider, Avatar, AvatarGroup, Badge, BankAlert, BankAlertText, BankButton, BankButtonText, BankCard, BankDivider, BankField, BankHeading, BankInput, BankPage, BankPinBox, BankText, Button, ButtonGroup, ButtonGroupRadio, Checkbox2 as Checkbox, CheckboxGroup2 as CheckboxGroup, CloseButton, CollapsibleDetails, CollapsibleList, ColorModeProvider, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, DrawerActionTrigger, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger, EmptyState, ExpirationSelector, Field, GreeksDisplay, Heading, IconButton, Image2 as Image, Input, InputGroup, LUX_BRAND, Link, LinkBox, LinkExternalIcon, LinkOverlay, MenuArrow, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuItemText, MenuRadioItem, MenuRadioItemGroup, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, OptionChain, OptionPositionCard, PARS_GOLD, PinInput, PnlDiagram, PopoverArrow, PopoverBody, PopoverCloseTrigger, PopoverCloseTriggerWrapper, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger, Progress, ProgressCircleRing, ProgressCircleRoot, ProgressCircleValueText, Radio2 as Radio, RadioGroup3 as RadioGroup, Rating, Select, SelectAsync, SelectClearTrigger, SelectContent, SelectControl, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectValueText, Separator2 as Separator, Skeleton, SkeletonCircle, SkeletonText, Slider, StrategyBuilder, Switch2 as Switch, TableBody, TableCaption, TableCell, TableColumnHeader, TableColumnHeaderSortable, TableFooter, TableHeader, TableHeaderSticky, TableRoot, TableRow, TableScrollWrapper, TabsContent, TabsCounter, TabsList, TabsRoot, TabsTrigger, Tag, Textarea, Toaster, Tooltip, bankColors, buttonVariants, cn, config, createListCollection, lux_config_default as guiConfig, luxThemes, toaster, useAccordion, useColorMode, useColorModeValue };
|
package/dist/input.cjs
CHANGED
|
@@ -38,13 +38,21 @@ var INPUT_VARIANT_CLASSES = {
|
|
|
38
38
|
unstyled: "border-0 bg-transparent p-0 h-auto"
|
|
39
39
|
};
|
|
40
40
|
var Input = React__default.default.forwardRef(
|
|
41
|
-
({ size = "md", variant = "outline", className, ...rest }, ref) => {
|
|
41
|
+
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
42
|
+
const handleChange = React__default.default.useCallback(
|
|
43
|
+
(event) => {
|
|
44
|
+
onChange?.(event);
|
|
45
|
+
onChangeText?.(event.target.value);
|
|
46
|
+
},
|
|
47
|
+
[onChange, onChangeText]
|
|
48
|
+
);
|
|
42
49
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
50
|
"input",
|
|
44
51
|
{
|
|
45
52
|
ref,
|
|
46
53
|
className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
|
|
47
|
-
...rest
|
|
54
|
+
...rest,
|
|
55
|
+
onChange: handleChange
|
|
48
56
|
}
|
|
49
57
|
);
|
|
50
58
|
}
|
package/dist/input.d.cts
CHANGED
|
@@ -5,6 +5,14 @@ type InputVariant = 'outline' | 'filled' | 'unstyled';
|
|
|
5
5
|
interface InputProps extends Omit<React__default.ComponentPropsWithRef<'input'>, 'size'> {
|
|
6
6
|
readonly size?: InputSize;
|
|
7
7
|
readonly variant?: InputVariant;
|
|
8
|
+
/**
|
|
9
|
+
* Tamagui / React-Native convention: called with the text value on every
|
|
10
|
+
* change. Bridged to the native `onChange`, so callers using EITHER the web
|
|
11
|
+
* `onChange(e)` API OR the `onChangeText(text)` API get updates. Without this
|
|
12
|
+
* bridge, RN/Tamagui-style code (e.g. seed-phrase / PIN entry ported from a
|
|
13
|
+
* gui-based surface) passes `onChangeText` and the field silently no-ops.
|
|
14
|
+
*/
|
|
15
|
+
readonly onChangeText?: (text: string) => void;
|
|
8
16
|
}
|
|
9
17
|
declare const Input: React__default.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
10
18
|
|
package/dist/input.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ type InputVariant = 'outline' | 'filled' | 'unstyled';
|
|
|
5
5
|
interface InputProps extends Omit<React__default.ComponentPropsWithRef<'input'>, 'size'> {
|
|
6
6
|
readonly size?: InputSize;
|
|
7
7
|
readonly variant?: InputVariant;
|
|
8
|
+
/**
|
|
9
|
+
* Tamagui / React-Native convention: called with the text value on every
|
|
10
|
+
* change. Bridged to the native `onChange`, so callers using EITHER the web
|
|
11
|
+
* `onChange(e)` API OR the `onChangeText(text)` API get updates. Without this
|
|
12
|
+
* bridge, RN/Tamagui-style code (e.g. seed-phrase / PIN entry ported from a
|
|
13
|
+
* gui-based surface) passes `onChangeText` and the field silently no-ops.
|
|
14
|
+
*/
|
|
15
|
+
readonly onChangeText?: (text: string) => void;
|
|
8
16
|
}
|
|
9
17
|
declare const Input: React__default.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
10
18
|
|
package/dist/input.js
CHANGED
|
@@ -32,13 +32,21 @@ var INPUT_VARIANT_CLASSES = {
|
|
|
32
32
|
unstyled: "border-0 bg-transparent p-0 h-auto"
|
|
33
33
|
};
|
|
34
34
|
var Input = React.forwardRef(
|
|
35
|
-
({ size = "md", variant = "outline", className, ...rest }, ref) => {
|
|
35
|
+
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
|
36
|
+
const handleChange = React.useCallback(
|
|
37
|
+
(event) => {
|
|
38
|
+
onChange?.(event);
|
|
39
|
+
onChangeText?.(event.target.value);
|
|
40
|
+
},
|
|
41
|
+
[onChange, onChangeText]
|
|
42
|
+
);
|
|
36
43
|
return /* @__PURE__ */ jsx(
|
|
37
44
|
"input",
|
|
38
45
|
{
|
|
39
46
|
ref,
|
|
40
47
|
className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
|
|
41
|
-
...rest
|
|
48
|
+
...rest,
|
|
49
|
+
onChange: handleChange
|
|
42
50
|
}
|
|
43
51
|
);
|
|
44
52
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var gui = require('@hanzo/gui');
|
|
7
|
+
var v5 = require('@hanzogui/config/v5');
|
|
8
|
+
|
|
9
|
+
var LUX_BRAND = {
|
|
10
|
+
lux: "#7000FF",
|
|
11
|
+
zoo: "#6C5EFB",
|
|
12
|
+
hanzo: "#EA580C",
|
|
13
|
+
pars: "#1C3879"
|
|
14
|
+
};
|
|
15
|
+
var PARS_GOLD = "#C8A45C";
|
|
16
|
+
var TRUE_BLACK = "#000000";
|
|
17
|
+
var darkBase = {
|
|
18
|
+
...v5.defaultConfig.themes.dark,
|
|
19
|
+
background: TRUE_BLACK,
|
|
20
|
+
backgroundHover: "#0A0A0A",
|
|
21
|
+
backgroundPress: "#141414",
|
|
22
|
+
backgroundFocus: "#0A0A0A"
|
|
23
|
+
};
|
|
24
|
+
var brandTheme = (accent, extra = {}) => ({
|
|
25
|
+
...darkBase,
|
|
26
|
+
accentBackground: accent,
|
|
27
|
+
accentColor: "#FFFFFF",
|
|
28
|
+
borderColorHover: accent,
|
|
29
|
+
colorHover: accent,
|
|
30
|
+
...extra
|
|
31
|
+
});
|
|
32
|
+
var luxThemes = {
|
|
33
|
+
dark: darkBase,
|
|
34
|
+
dark_lux: brandTheme(LUX_BRAND.lux),
|
|
35
|
+
dark_zoo: brandTheme(LUX_BRAND.zoo),
|
|
36
|
+
dark_hanzo: brandTheme(LUX_BRAND.hanzo),
|
|
37
|
+
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD })
|
|
38
|
+
};
|
|
39
|
+
var config = gui.createGui({
|
|
40
|
+
...v5.defaultConfig,
|
|
41
|
+
settings: {
|
|
42
|
+
...v5.defaultConfig.settings,
|
|
43
|
+
onlyAllowShorthands: false
|
|
44
|
+
},
|
|
45
|
+
themes: {
|
|
46
|
+
...v5.defaultConfig.themes,
|
|
47
|
+
...luxThemes
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var lux_config_default = config;
|
|
51
|
+
|
|
52
|
+
exports.LUX_BRAND = LUX_BRAND;
|
|
53
|
+
exports.PARS_GOLD = PARS_GOLD;
|
|
54
|
+
exports.config = config;
|
|
55
|
+
exports.default = lux_config_default;
|
|
56
|
+
exports.luxThemes = luxThemes;
|