@luxfi/ui 7.2.0 → 7.3.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/index.cjs +18 -7
- package/dist/index.js +18 -7
- package/dist/provider.cjs +35 -55
- package/dist/provider.js +16 -35
- package/package.json +6 -6
- package/src/index.ts +1 -0
- package/src/provider.tsx +28 -6
- package/dist/accordion.d.cts +0 -74
- package/dist/accordion.d.ts +0 -74
- package/dist/alert.d.cts +0 -30
- package/dist/alert.d.ts +0 -30
- package/dist/avatar.d.cts +0 -25
- package/dist/avatar.d.ts +0 -25
- package/dist/badge.d.cts +0 -19
- package/dist/badge.d.ts +0 -19
- package/dist/bank.d.cts +0 -76
- package/dist/bank.d.ts +0 -76
- package/dist/button.d.cts +0 -55
- package/dist/button.d.ts +0 -55
- package/dist/checkbox.d.cts +0 -31
- package/dist/checkbox.d.ts +0 -31
- package/dist/close-button.d.cts +0 -9
- package/dist/close-button.d.ts +0 -9
- package/dist/collapsible.d.cts +0 -23
- package/dist/collapsible.d.ts +0 -23
- package/dist/color-mode.d.cts +0 -25
- package/dist/color-mode.d.ts +0 -25
- package/dist/dialog.d.cts +0 -65
- package/dist/dialog.d.ts +0 -65
- package/dist/drawer.d.cts +0 -36
- package/dist/drawer.d.ts +0 -36
- package/dist/empty-state.d.cts +0 -13
- package/dist/empty-state.d.ts +0 -13
- package/dist/expiration-selector.d.cts +0 -16
- package/dist/expiration-selector.d.ts +0 -16
- package/dist/field.d.cts +0 -24
- package/dist/field.d.ts +0 -24
- package/dist/greeks-display.d.cts +0 -14
- package/dist/greeks-display.d.ts +0 -14
- package/dist/heading.d.cts +0 -10
- package/dist/heading.d.ts +0 -10
- package/dist/icon-button.d.cts +0 -33
- package/dist/icon-button.d.ts +0 -33
- package/dist/image.d.cts +0 -57
- package/dist/image.d.ts +0 -57
- package/dist/index.d.cts +0 -55
- package/dist/index.d.ts +0 -55
- package/dist/input-group.d.cts +0 -17
- package/dist/input-group.d.ts +0 -17
- package/dist/input.d.cts +0 -11
- package/dist/input.d.ts +0 -11
- package/dist/link.d.cts +0 -37
- package/dist/link.d.ts +0 -37
- package/dist/menu.d.cts +0 -84
- package/dist/menu.d.ts +0 -84
- package/dist/option-chain.d.cts +0 -37
- package/dist/option-chain.d.ts +0 -37
- package/dist/option-position.d.cts +0 -29
- package/dist/option-position.d.ts +0 -29
- package/dist/pin-input.d.cts +0 -25
- package/dist/pin-input.d.ts +0 -25
- package/dist/pnl-diagram.d.cts +0 -11
- package/dist/pnl-diagram.d.ts +0 -11
- package/dist/popover.d.cts +0 -73
- package/dist/popover.d.ts +0 -73
- package/dist/progress-circle.d.cts +0 -47
- package/dist/progress-circle.d.ts +0 -47
- package/dist/progress.d.cts +0 -28
- package/dist/progress.d.ts +0 -28
- package/dist/provider.d.cts +0 -7
- package/dist/provider.d.ts +0 -7
- package/dist/radio.d.cts +0 -53
- package/dist/radio.d.ts +0 -53
- package/dist/rating.d.cts +0 -14
- package/dist/rating.d.ts +0 -14
- package/dist/select.d.cts +0 -130
- package/dist/select.d.ts +0 -130
- package/dist/separator.d.cts +0 -13
- package/dist/separator.d.ts +0 -13
- package/dist/skeleton.d.cts +0 -60
- package/dist/skeleton.d.ts +0 -60
- package/dist/slider.d.cts +0 -24
- package/dist/slider.d.ts +0 -24
- package/dist/strategy-builder.d.cts +0 -26
- package/dist/strategy-builder.d.ts +0 -26
- package/dist/switch.d.cts +0 -27
- package/dist/switch.d.ts +0 -27
- package/dist/table.d.cts +0 -107
- package/dist/table.d.ts +0 -107
- package/dist/tabs.d.cts +0 -78
- package/dist/tabs.d.ts +0 -78
- package/dist/tag.d.cts +0 -21
- package/dist/tag.d.ts +0 -21
- package/dist/textarea.d.cts +0 -11
- package/dist/textarea.d.ts +0 -11
- package/dist/toaster.d.cts +0 -29
- package/dist/toaster.d.ts +0 -29
- package/dist/tooltip.d.cts +0 -38
- package/dist/tooltip.d.ts +0 -38
- package/dist/utils.d.cts +0 -5
- package/dist/utils.d.ts +0 -5
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var core = require('@hanzogui/core');
|
|
5
|
+
var reactQuery = require('@tanstack/react-query');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
7
|
var clsx = require('clsx');
|
|
5
8
|
var tailwindMerge = require('tailwind-merge');
|
|
6
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
10
|
var React29 = require('react');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var core = require('@hanzogui/core');
|
|
10
11
|
var RadixAvatar = require('@radix-ui/react-avatar');
|
|
11
12
|
var tooltip = require('@hanzogui/tooltip');
|
|
12
13
|
var usehooks = require('@uidotdev/usehooks');
|
|
@@ -60,7 +61,20 @@ var RadixSlider__namespace = /*#__PURE__*/_interopNamespace(RadixSlider);
|
|
|
60
61
|
var RadixSwitch__namespace = /*#__PURE__*/_interopNamespace(RadixSwitch);
|
|
61
62
|
var RadixTabs__namespace = /*#__PURE__*/_interopNamespace(RadixTabs);
|
|
62
63
|
|
|
63
|
-
// src/
|
|
64
|
+
// src/provider.tsx
|
|
65
|
+
var _guiInitialized = false;
|
|
66
|
+
function ensureGui() {
|
|
67
|
+
if (_guiInitialized) return;
|
|
68
|
+
core.createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
69
|
+
_guiInitialized = true;
|
|
70
|
+
}
|
|
71
|
+
ensureGui();
|
|
72
|
+
var defaultQueryClient = new reactQuery.QueryClient({
|
|
73
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
74
|
+
});
|
|
75
|
+
var AppProvider = ({ children, queryClient }) => {
|
|
76
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
77
|
+
};
|
|
64
78
|
function cn(...inputs) {
|
|
65
79
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
66
80
|
}
|
|
@@ -5486,9 +5500,6 @@ var Toaster = () => {
|
|
|
5486
5500
|
}
|
|
5487
5501
|
);
|
|
5488
5502
|
};
|
|
5489
|
-
function Provider(props) {
|
|
5490
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ColorModeProvider, { ...props });
|
|
5491
|
-
}
|
|
5492
5503
|
function fmt(n, decimals = 2) {
|
|
5493
5504
|
if (n === void 0 || n === null) return "-";
|
|
5494
5505
|
return n.toFixed(decimals);
|
|
@@ -7012,6 +7023,7 @@ exports.AccordionItemContent = AccordionItemContent;
|
|
|
7012
7023
|
exports.AccordionItemTrigger = AccordionItemTrigger;
|
|
7013
7024
|
exports.AccordionRoot = AccordionRoot;
|
|
7014
7025
|
exports.Alert = Alert;
|
|
7026
|
+
exports.AppProvider = AppProvider;
|
|
7015
7027
|
exports.Avatar = Avatar;
|
|
7016
7028
|
exports.AvatarGroup = AvatarGroup;
|
|
7017
7029
|
exports.Badge = Badge;
|
|
@@ -7101,7 +7113,6 @@ exports.Progress = Progress;
|
|
|
7101
7113
|
exports.ProgressCircleRing = ProgressCircleRing;
|
|
7102
7114
|
exports.ProgressCircleRoot = ProgressCircleRoot;
|
|
7103
7115
|
exports.ProgressCircleValueText = ProgressCircleValueText;
|
|
7104
|
-
exports.Provider = Provider;
|
|
7105
7116
|
exports.Radio = Radio2;
|
|
7106
7117
|
exports.RadioGroup = RadioGroup3;
|
|
7107
7118
|
exports.Rating = Rating;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { styled, View, Text, createGui } from '@hanzogui/core';
|
|
3
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
5
|
import { clsx } from 'clsx';
|
|
3
6
|
import { twMerge } from 'tailwind-merge';
|
|
4
7
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
8
|
import * as React29 from 'react';
|
|
6
9
|
import React29__default from 'react';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { styled, View, Text } from '@hanzogui/core';
|
|
9
10
|
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
10
11
|
import { TooltipGroup, Tooltip as Tooltip$1 } from '@hanzogui/tooltip';
|
|
11
12
|
import { useClickAway, useDebounce } from '@uidotdev/usehooks';
|
|
@@ -26,7 +27,20 @@ import * as RadixSwitch from '@radix-ui/react-switch';
|
|
|
26
27
|
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
27
28
|
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
28
29
|
|
|
29
|
-
// src/
|
|
30
|
+
// src/provider.tsx
|
|
31
|
+
var _guiInitialized = false;
|
|
32
|
+
function ensureGui() {
|
|
33
|
+
if (_guiInitialized) return;
|
|
34
|
+
createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
35
|
+
_guiInitialized = true;
|
|
36
|
+
}
|
|
37
|
+
ensureGui();
|
|
38
|
+
var defaultQueryClient = new QueryClient({
|
|
39
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
40
|
+
});
|
|
41
|
+
var AppProvider = ({ children, queryClient }) => {
|
|
42
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
43
|
+
};
|
|
30
44
|
function cn(...inputs) {
|
|
31
45
|
return twMerge(clsx(inputs));
|
|
32
46
|
}
|
|
@@ -5452,9 +5466,6 @@ var Toaster = () => {
|
|
|
5452
5466
|
}
|
|
5453
5467
|
);
|
|
5454
5468
|
};
|
|
5455
|
-
function Provider(props) {
|
|
5456
|
-
return /* @__PURE__ */ jsx(ColorModeProvider, { ...props });
|
|
5457
|
-
}
|
|
5458
5469
|
function fmt(n, decimals = 2) {
|
|
5459
5470
|
if (n === void 0 || n === null) return "-";
|
|
5460
5471
|
return n.toFixed(decimals);
|
|
@@ -6973,4 +6984,4 @@ var BankPage = styled(View, {
|
|
|
6973
6984
|
padding: 16
|
|
6974
6985
|
});
|
|
6975
6986
|
|
|
6976
|
-
export { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot, Alert, 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,
|
|
6987
|
+
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 };
|
package/dist/provider.cjs
CHANGED
|
@@ -1,62 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var core = require('@hanzogui/core');
|
|
5
|
+
var reactQuery = require('@tanstack/react-query');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
8
|
+
var _guiInitialized = false;
|
|
9
|
+
function ensureGui() {
|
|
10
|
+
if (_guiInitialized) return;
|
|
11
|
+
core.createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
12
|
+
_guiInitialized = true;
|
|
23
13
|
}
|
|
14
|
+
ensureGui();
|
|
15
|
+
var defaultQueryClient = new reactQuery.QueryClient({
|
|
16
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
17
|
+
});
|
|
18
|
+
var AppProvider = ({ children, queryClient }) => {
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
20
|
+
};
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
document.documentElement.classList.toggle("light", resolved === "light");
|
|
47
|
-
}
|
|
48
|
-
}, [onValueChange]);
|
|
49
|
-
const toggleColorMode = React__namespace.useCallback(() => {
|
|
50
|
-
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
51
|
-
}, [colorMode, setColorMode]);
|
|
52
|
-
const ctx = React__namespace.useMemo(
|
|
53
|
-
() => ({ colorMode, setColorMode, toggleColorMode }),
|
|
54
|
-
[colorMode, setColorMode, toggleColorMode]
|
|
55
|
-
);
|
|
56
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ColorModeContext.Provider, { value: ctx, children });
|
|
57
|
-
}
|
|
58
|
-
function Provider(props) {
|
|
59
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ColorModeProvider, { ...props });
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
exports.Provider = Provider;
|
|
22
|
+
Object.defineProperty(exports, "QueryClient", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return reactQuery.QueryClient; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "useInfiniteQuery", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return reactQuery.useInfiniteQuery; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "useMutation", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return reactQuery.useMutation; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "useQuery", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return reactQuery.useQuery; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "useQueryClient", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return reactQuery.useQueryClient; }
|
|
41
|
+
});
|
|
42
|
+
exports.AppProvider = AppProvider;
|
package/dist/provider.js
CHANGED
|
@@ -1,40 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { createGui } from '@hanzogui/core';
|
|
3
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
4
|
+
export { QueryClient, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
5
|
import { jsx } from 'react/jsx-runtime';
|
|
4
6
|
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return controlledValue;
|
|
11
|
-
}
|
|
12
|
-
if (typeof document !== "undefined") {
|
|
13
|
-
if (document.documentElement.classList.contains("dark")) return "dark";
|
|
14
|
-
}
|
|
15
|
-
return defaultTheme === "dark" ? "dark" : "light";
|
|
16
|
-
});
|
|
17
|
-
const colorMode = controlledValue === "dark" || controlledValue === "light" ? controlledValue : internalMode;
|
|
18
|
-
const setColorMode = React.useCallback((mode) => {
|
|
19
|
-
const resolved = mode === "dark" ? "dark" : "light";
|
|
20
|
-
setInternalMode(resolved);
|
|
21
|
-
onValueChange?.(resolved);
|
|
22
|
-
if (typeof document !== "undefined") {
|
|
23
|
-
document.documentElement.classList.toggle("dark", resolved === "dark");
|
|
24
|
-
document.documentElement.classList.toggle("light", resolved === "light");
|
|
25
|
-
}
|
|
26
|
-
}, [onValueChange]);
|
|
27
|
-
const toggleColorMode = React.useCallback(() => {
|
|
28
|
-
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
29
|
-
}, [colorMode, setColorMode]);
|
|
30
|
-
const ctx = React.useMemo(
|
|
31
|
-
() => ({ colorMode, setColorMode, toggleColorMode }),
|
|
32
|
-
[colorMode, setColorMode, toggleColorMode]
|
|
33
|
-
);
|
|
34
|
-
return /* @__PURE__ */ jsx(ColorModeContext.Provider, { value: ctx, children });
|
|
35
|
-
}
|
|
36
|
-
function Provider(props) {
|
|
37
|
-
return /* @__PURE__ */ jsx(ColorModeProvider, { ...props });
|
|
7
|
+
var _guiInitialized = false;
|
|
8
|
+
function ensureGui() {
|
|
9
|
+
if (_guiInitialized) return;
|
|
10
|
+
createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
11
|
+
_guiInitialized = true;
|
|
38
12
|
}
|
|
13
|
+
ensureGui();
|
|
14
|
+
var defaultQueryClient = new QueryClient({
|
|
15
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
16
|
+
});
|
|
17
|
+
var AppProvider = ({ children, queryClient }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
19
|
+
};
|
|
39
20
|
|
|
40
|
-
export {
|
|
21
|
+
export { AppProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/ui",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Radix + Tailwind UI primitives for Lux apps. Drop-in replacements for Chakra compound components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -222,9 +222,8 @@
|
|
|
222
222
|
"require": "./dist/tooltip.cjs"
|
|
223
223
|
},
|
|
224
224
|
"./provider": {
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"require": "./dist/provider.cjs"
|
|
225
|
+
"import": "./src/provider.tsx",
|
|
226
|
+
"types": "./src/provider.tsx"
|
|
228
227
|
},
|
|
229
228
|
"./utils": {
|
|
230
229
|
"types": "./dist/utils.d.ts",
|
|
@@ -277,11 +276,12 @@
|
|
|
277
276
|
"es-toolkit": "^1.31.0",
|
|
278
277
|
"react-icons": "^5.4.0",
|
|
279
278
|
"sonner": "^2.0.0",
|
|
280
|
-
"tailwind-merge": "^3.0.0"
|
|
279
|
+
"tailwind-merge": "^3.0.0",
|
|
280
|
+
"@tanstack/react-query": "^5.76.0"
|
|
281
281
|
},
|
|
282
282
|
"peerDependencies": {
|
|
283
283
|
"@hanzogui/core": "^3.0.6",
|
|
284
|
-
"react": "
|
|
284
|
+
"react": ">=18",
|
|
285
285
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
286
286
|
},
|
|
287
287
|
"devDependencies": {
|
package/src/index.ts
CHANGED
package/src/provider.tsx
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { createGui } from '@hanzogui/core';
|
|
4
|
+
import { QueryClient, QueryClientProvider, useQueryClient, useQuery, useMutation, useInfiniteQuery } from '@tanstack/react-query';
|
|
3
5
|
import React from 'react';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
// Initialize @hanzogui once at module load
|
|
8
|
+
let _guiInitialized = false;
|
|
9
|
+
function ensureGui() {
|
|
10
|
+
if (_guiInitialized) return;
|
|
11
|
+
createGui({ settings: { autocompleteSpecificTokens: 'except-special' } });
|
|
12
|
+
_guiInitialized = true;
|
|
13
|
+
}
|
|
14
|
+
ensureGui();
|
|
15
|
+
|
|
16
|
+
const defaultQueryClient = new QueryClient({
|
|
17
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 30_000 } },
|
|
18
|
+
});
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
interface AppProviderProps {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
queryClient?: QueryClient;
|
|
12
23
|
}
|
|
24
|
+
|
|
25
|
+
export const AppProvider = ({ children, queryClient }: AppProviderProps) => {
|
|
26
|
+
return (
|
|
27
|
+
<QueryClientProvider client={ queryClient ?? defaultQueryClient }>
|
|
28
|
+
{ children }
|
|
29
|
+
</QueryClientProvider>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Re-export tanstack hooks so consumers never import @tanstack/react-query directly
|
|
34
|
+
export { QueryClient, useQueryClient, useQuery, useMutation, useInfiniteQuery };
|
package/dist/accordion.d.cts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
interface AccordionRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'dir'> {
|
|
5
|
-
/** Open multiple items simultaneously. Defaults to true. */
|
|
6
|
-
readonly multiple?: boolean;
|
|
7
|
-
/** Controlled open items (array of `value` strings). */
|
|
8
|
-
readonly value?: Array<string>;
|
|
9
|
-
/** Uncontrolled initial open items. */
|
|
10
|
-
readonly defaultValue?: Array<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Called when open items change.
|
|
13
|
-
* Wraps the value in `{ value }` to stay compatible with the Chakra callback shape
|
|
14
|
-
* that consumers already rely on.
|
|
15
|
-
*/
|
|
16
|
-
readonly onValueChange?: (details: {
|
|
17
|
-
value: Array<string>;
|
|
18
|
-
}) => void;
|
|
19
|
-
readonly variant?: 'outline' | 'faq';
|
|
20
|
-
readonly size?: 'sm' | 'md';
|
|
21
|
-
/** Accepted for compatibility; not applied visually. */
|
|
22
|
-
readonly noAnimation?: boolean;
|
|
23
|
-
/** Accepted for compatibility; Radix defers rendering internally. */
|
|
24
|
-
readonly lazyMount?: boolean;
|
|
25
|
-
readonly children?: React.ReactNode;
|
|
26
|
-
readonly position?: string;
|
|
27
|
-
readonly w?: string;
|
|
28
|
-
readonly bgColor?: string | Record<string, string>;
|
|
29
|
-
readonly borderRadius?: string;
|
|
30
|
-
}
|
|
31
|
-
declare const AccordionRoot: React.ForwardRefExoticComponent<AccordionRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
interface AccordionItemProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> {
|
|
33
|
-
as?: string;
|
|
34
|
-
_first?: Record<string, unknown>;
|
|
35
|
-
_last?: Record<string, unknown>;
|
|
36
|
-
display?: string;
|
|
37
|
-
}
|
|
38
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
interface AccordionItemTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>, 'dir'> {
|
|
40
|
-
readonly indicatorPlacement?: 'start' | 'end';
|
|
41
|
-
readonly noIndicator?: boolean;
|
|
42
|
-
readonly variant?: 'outline' | 'faq';
|
|
43
|
-
px?: number | string;
|
|
44
|
-
py?: number | string;
|
|
45
|
-
_hover?: Record<string, string>;
|
|
46
|
-
wordBreak?: string;
|
|
47
|
-
textAlign?: string;
|
|
48
|
-
cursor?: string;
|
|
49
|
-
display?: string;
|
|
50
|
-
alignItems?: string;
|
|
51
|
-
columnGap?: number | string;
|
|
52
|
-
}
|
|
53
|
-
declare const AccordionItemTrigger: React.ForwardRefExoticComponent<AccordionItemTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
-
interface AccordionItemContentProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {
|
|
55
|
-
pb?: number | string;
|
|
56
|
-
pr?: number | string;
|
|
57
|
-
pl?: string;
|
|
58
|
-
w?: string;
|
|
59
|
-
display?: string;
|
|
60
|
-
flexDir?: string;
|
|
61
|
-
rowGap?: number | string;
|
|
62
|
-
}
|
|
63
|
-
declare const AccordionItemContent: React.ForwardRefExoticComponent<AccordionItemContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
-
declare function useAccordion(items: Array<{
|
|
65
|
-
id: string;
|
|
66
|
-
}>): {
|
|
67
|
-
value: string[];
|
|
68
|
-
onValueChange: ({ value }: {
|
|
69
|
-
value: Array<string>;
|
|
70
|
-
}) => void;
|
|
71
|
-
scrollToItemFromUrl: () => void;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export { AccordionItem, AccordionItemContent, type AccordionItemContentProps, AccordionItemTrigger, AccordionRoot, useAccordion };
|
package/dist/accordion.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
interface AccordionRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'dir'> {
|
|
5
|
-
/** Open multiple items simultaneously. Defaults to true. */
|
|
6
|
-
readonly multiple?: boolean;
|
|
7
|
-
/** Controlled open items (array of `value` strings). */
|
|
8
|
-
readonly value?: Array<string>;
|
|
9
|
-
/** Uncontrolled initial open items. */
|
|
10
|
-
readonly defaultValue?: Array<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Called when open items change.
|
|
13
|
-
* Wraps the value in `{ value }` to stay compatible with the Chakra callback shape
|
|
14
|
-
* that consumers already rely on.
|
|
15
|
-
*/
|
|
16
|
-
readonly onValueChange?: (details: {
|
|
17
|
-
value: Array<string>;
|
|
18
|
-
}) => void;
|
|
19
|
-
readonly variant?: 'outline' | 'faq';
|
|
20
|
-
readonly size?: 'sm' | 'md';
|
|
21
|
-
/** Accepted for compatibility; not applied visually. */
|
|
22
|
-
readonly noAnimation?: boolean;
|
|
23
|
-
/** Accepted for compatibility; Radix defers rendering internally. */
|
|
24
|
-
readonly lazyMount?: boolean;
|
|
25
|
-
readonly children?: React.ReactNode;
|
|
26
|
-
readonly position?: string;
|
|
27
|
-
readonly w?: string;
|
|
28
|
-
readonly bgColor?: string | Record<string, string>;
|
|
29
|
-
readonly borderRadius?: string;
|
|
30
|
-
}
|
|
31
|
-
declare const AccordionRoot: React.ForwardRefExoticComponent<AccordionRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
interface AccordionItemProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> {
|
|
33
|
-
as?: string;
|
|
34
|
-
_first?: Record<string, unknown>;
|
|
35
|
-
_last?: Record<string, unknown>;
|
|
36
|
-
display?: string;
|
|
37
|
-
}
|
|
38
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
interface AccordionItemTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>, 'dir'> {
|
|
40
|
-
readonly indicatorPlacement?: 'start' | 'end';
|
|
41
|
-
readonly noIndicator?: boolean;
|
|
42
|
-
readonly variant?: 'outline' | 'faq';
|
|
43
|
-
px?: number | string;
|
|
44
|
-
py?: number | string;
|
|
45
|
-
_hover?: Record<string, string>;
|
|
46
|
-
wordBreak?: string;
|
|
47
|
-
textAlign?: string;
|
|
48
|
-
cursor?: string;
|
|
49
|
-
display?: string;
|
|
50
|
-
alignItems?: string;
|
|
51
|
-
columnGap?: number | string;
|
|
52
|
-
}
|
|
53
|
-
declare const AccordionItemTrigger: React.ForwardRefExoticComponent<AccordionItemTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
-
interface AccordionItemContentProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {
|
|
55
|
-
pb?: number | string;
|
|
56
|
-
pr?: number | string;
|
|
57
|
-
pl?: string;
|
|
58
|
-
w?: string;
|
|
59
|
-
display?: string;
|
|
60
|
-
flexDir?: string;
|
|
61
|
-
rowGap?: number | string;
|
|
62
|
-
}
|
|
63
|
-
declare const AccordionItemContent: React.ForwardRefExoticComponent<AccordionItemContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
-
declare function useAccordion(items: Array<{
|
|
65
|
-
id: string;
|
|
66
|
-
}>): {
|
|
67
|
-
value: string[];
|
|
68
|
-
onValueChange: ({ value }: {
|
|
69
|
-
value: Array<string>;
|
|
70
|
-
}) => void;
|
|
71
|
-
scrollToItemFromUrl: () => void;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export { AccordionItem, AccordionItemContent, type AccordionItemContentProps, AccordionItemTrigger, AccordionRoot, useAccordion };
|
package/dist/alert.d.cts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type AlertStatus = 'info' | 'warning' | 'warning_table' | 'success' | 'error';
|
|
4
|
-
interface AlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
|
-
readonly status?: AlertStatus;
|
|
6
|
-
readonly size?: 'sm' | 'md';
|
|
7
|
-
readonly inline?: boolean;
|
|
8
|
-
readonly startElement?: React.ReactNode;
|
|
9
|
-
readonly endElement?: React.ReactNode;
|
|
10
|
-
readonly descriptionProps?: Omit<React.ComponentPropsWithoutRef<'div'>, 'ref'> & {
|
|
11
|
-
whiteSpace?: string;
|
|
12
|
-
alignItems?: string;
|
|
13
|
-
flexDir?: string;
|
|
14
|
-
flexWrap?: string;
|
|
15
|
-
rowGap?: number | string;
|
|
16
|
-
columnGap?: number | string;
|
|
17
|
-
};
|
|
18
|
-
readonly title?: React.ReactNode;
|
|
19
|
-
readonly icon?: React.ReactElement;
|
|
20
|
-
readonly closable?: boolean;
|
|
21
|
-
readonly onClose?: () => void;
|
|
22
|
-
readonly loading?: boolean;
|
|
23
|
-
readonly showIcon?: boolean;
|
|
24
|
-
readonly whiteSpace?: string;
|
|
25
|
-
readonly mb?: number | string;
|
|
26
|
-
readonly mt?: number | string;
|
|
27
|
-
}
|
|
28
|
-
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
|
|
30
|
-
export { Alert, type AlertProps };
|
package/dist/alert.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type AlertStatus = 'info' | 'warning' | 'warning_table' | 'success' | 'error';
|
|
4
|
-
interface AlertProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
|
-
readonly status?: AlertStatus;
|
|
6
|
-
readonly size?: 'sm' | 'md';
|
|
7
|
-
readonly inline?: boolean;
|
|
8
|
-
readonly startElement?: React.ReactNode;
|
|
9
|
-
readonly endElement?: React.ReactNode;
|
|
10
|
-
readonly descriptionProps?: Omit<React.ComponentPropsWithoutRef<'div'>, 'ref'> & {
|
|
11
|
-
whiteSpace?: string;
|
|
12
|
-
alignItems?: string;
|
|
13
|
-
flexDir?: string;
|
|
14
|
-
flexWrap?: string;
|
|
15
|
-
rowGap?: number | string;
|
|
16
|
-
columnGap?: number | string;
|
|
17
|
-
};
|
|
18
|
-
readonly title?: React.ReactNode;
|
|
19
|
-
readonly icon?: React.ReactElement;
|
|
20
|
-
readonly closable?: boolean;
|
|
21
|
-
readonly onClose?: () => void;
|
|
22
|
-
readonly loading?: boolean;
|
|
23
|
-
readonly showIcon?: boolean;
|
|
24
|
-
readonly whiteSpace?: string;
|
|
25
|
-
readonly mb?: number | string;
|
|
26
|
-
readonly mt?: number | string;
|
|
27
|
-
}
|
|
28
|
-
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
|
|
30
|
-
export { Alert, type AlertProps };
|
package/dist/avatar.d.cts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
|
4
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
5
|
-
type AvatarVariant = 'solid' | 'subtle' | 'outline';
|
|
6
|
-
interface AvatarProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
7
|
-
name?: string;
|
|
8
|
-
src?: string;
|
|
9
|
-
srcSet?: string;
|
|
10
|
-
loading?: ImageProps['loading'];
|
|
11
|
-
icon?: React.ReactElement;
|
|
12
|
-
fallback?: React.ReactNode;
|
|
13
|
-
size?: AvatarSize;
|
|
14
|
-
variant?: AvatarVariant;
|
|
15
|
-
borderless?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
-
interface AvatarGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
19
|
-
size?: AvatarSize;
|
|
20
|
-
variant?: AvatarVariant;
|
|
21
|
-
borderless?: boolean;
|
|
22
|
-
}
|
|
23
|
-
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
|
|
25
|
-
export { Avatar, AvatarGroup, type AvatarProps };
|
package/dist/avatar.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
|
4
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
5
|
-
type AvatarVariant = 'solid' | 'subtle' | 'outline';
|
|
6
|
-
interface AvatarProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
7
|
-
name?: string;
|
|
8
|
-
src?: string;
|
|
9
|
-
srcSet?: string;
|
|
10
|
-
loading?: ImageProps['loading'];
|
|
11
|
-
icon?: React.ReactElement;
|
|
12
|
-
fallback?: React.ReactNode;
|
|
13
|
-
size?: AvatarSize;
|
|
14
|
-
variant?: AvatarVariant;
|
|
15
|
-
borderless?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
-
interface AvatarGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
19
|
-
size?: AvatarSize;
|
|
20
|
-
variant?: AvatarVariant;
|
|
21
|
-
borderless?: boolean;
|
|
22
|
-
}
|
|
23
|
-
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
|
|
25
|
-
export { Avatar, AvatarGroup, type AvatarProps };
|
package/dist/badge.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
type ColorPalette = 'gray' | 'green' | 'red' | 'purple' | 'orange' | 'blue' | 'yellow' | 'teal' | 'cyan' | 'pink' | 'purple_alt' | 'blue_alt' | 'bright_gray' | 'bright_green' | 'bright_red' | 'bright_blue' | 'bright_yellow' | 'bright_teal' | 'bright_cyan' | 'bright_orange' | 'bright_purple' | 'bright_pink';
|
|
4
|
-
interface BadgeProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
5
|
-
readonly loading?: boolean;
|
|
6
|
-
readonly startElement?: React__default.ReactNode;
|
|
7
|
-
readonly endElement?: React__default.ReactNode;
|
|
8
|
-
readonly truncated?: boolean;
|
|
9
|
-
readonly colorPalette?: ColorPalette;
|
|
10
|
-
readonly variant?: 'subtle' | 'solid';
|
|
11
|
-
readonly size?: 'sm' | 'md' | 'lg';
|
|
12
|
-
readonly flexShrink?: number;
|
|
13
|
-
readonly gap?: number | string;
|
|
14
|
-
readonly ml?: number | string | Record<string, number>;
|
|
15
|
-
readonly mr?: number | string;
|
|
16
|
-
}
|
|
17
|
-
declare const Badge: React__default.ForwardRefExoticComponent<BadgeProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
export { Badge, type BadgeProps };
|