@luxfi/ui 7.3.0 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.cts +74 -0
- package/dist/accordion.d.ts +74 -0
- package/dist/alert.d.cts +30 -0
- package/dist/alert.d.ts +30 -0
- package/dist/avatar.d.cts +25 -0
- package/dist/avatar.d.ts +25 -0
- package/dist/badge.d.cts +19 -0
- package/dist/badge.d.ts +19 -0
- package/dist/bank.d.cts +76 -0
- package/dist/bank.d.ts +76 -0
- package/dist/button.d.cts +55 -0
- package/dist/button.d.ts +55 -0
- package/dist/checkbox.d.cts +31 -0
- package/dist/checkbox.d.ts +31 -0
- package/dist/close-button.d.cts +9 -0
- package/dist/close-button.d.ts +9 -0
- package/dist/collapsible.d.cts +23 -0
- package/dist/collapsible.d.ts +23 -0
- package/dist/color-mode.d.cts +25 -0
- package/dist/color-mode.d.ts +25 -0
- package/dist/dialog.d.cts +65 -0
- package/dist/dialog.d.ts +65 -0
- package/dist/drawer.d.cts +36 -0
- package/dist/drawer.d.ts +36 -0
- package/dist/empty-state.d.cts +13 -0
- package/dist/empty-state.d.ts +13 -0
- package/dist/expiration-selector.d.cts +16 -0
- package/dist/expiration-selector.d.ts +16 -0
- package/dist/field.d.cts +24 -0
- package/dist/field.d.ts +24 -0
- package/dist/greeks-display.d.cts +14 -0
- package/dist/greeks-display.d.ts +14 -0
- package/dist/heading.d.cts +10 -0
- package/dist/heading.d.ts +10 -0
- package/dist/icon-button.d.cts +33 -0
- package/dist/icon-button.d.ts +33 -0
- package/dist/image.d.cts +57 -0
- package/dist/image.d.ts +57 -0
- package/dist/index.cjs +278 -275
- package/dist/index.d.cts +56 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +278 -275
- package/dist/input-group.d.cts +17 -0
- package/dist/input-group.d.ts +17 -0
- package/dist/input.d.cts +11 -0
- package/dist/input.d.ts +11 -0
- package/dist/link.d.cts +37 -0
- package/dist/link.d.ts +37 -0
- package/dist/menu.d.cts +84 -0
- package/dist/menu.d.ts +84 -0
- package/dist/option-chain.d.cts +37 -0
- package/dist/option-chain.d.ts +37 -0
- package/dist/option-position.d.cts +29 -0
- package/dist/option-position.d.ts +29 -0
- package/dist/pin-input.d.cts +25 -0
- package/dist/pin-input.d.ts +25 -0
- package/dist/pnl-diagram.d.cts +11 -0
- package/dist/pnl-diagram.d.ts +11 -0
- package/dist/popover.d.cts +73 -0
- package/dist/popover.d.ts +73 -0
- package/dist/progress-circle.d.cts +47 -0
- package/dist/progress-circle.d.ts +47 -0
- package/dist/progress.d.cts +28 -0
- package/dist/progress.d.ts +28 -0
- package/dist/provider.cjs +9 -1
- package/dist/provider.d.cts +12 -0
- package/dist/provider.d.ts +12 -0
- package/dist/provider.js +5 -1
- package/dist/radio.d.cts +53 -0
- package/dist/radio.d.ts +53 -0
- package/dist/rating.d.cts +14 -0
- package/dist/rating.d.ts +14 -0
- package/dist/select.d.cts +130 -0
- package/dist/select.d.ts +130 -0
- package/dist/separator.d.cts +13 -0
- package/dist/separator.d.ts +13 -0
- package/dist/skeleton.d.cts +60 -0
- package/dist/skeleton.d.ts +60 -0
- package/dist/slider.d.cts +24 -0
- package/dist/slider.d.ts +24 -0
- package/dist/strategy-builder.d.cts +26 -0
- package/dist/strategy-builder.d.ts +26 -0
- package/dist/switch.d.cts +27 -0
- package/dist/switch.d.ts +27 -0
- package/dist/table.d.cts +107 -0
- package/dist/table.d.ts +107 -0
- package/dist/tabs.d.cts +78 -0
- package/dist/tabs.d.ts +78 -0
- package/dist/tag.d.cts +21 -0
- package/dist/tag.d.ts +21 -0
- package/dist/textarea.d.cts +11 -0
- package/dist/textarea.d.ts +11 -0
- package/dist/toaster.d.cts +29 -0
- package/dist/toaster.d.ts +29 -0
- package/dist/tooltip.d.cts +38 -0
- package/dist/tooltip.d.ts +38 -0
- package/dist/utils.d.cts +5 -0
- package/dist/utils.d.ts +5 -0
- package/package.json +1 -1
- package/src/index.ts +0 -2
- package/src/provider.tsx +3 -2
package/dist/tabs.d.cts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type TabsVariant = 'solid' | 'secondary' | 'segmented' | 'unstyled';
|
|
5
|
+
type TabsSize = 'sm' | 'md' | 'free';
|
|
6
|
+
interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'onValueChange'> {
|
|
7
|
+
/** Visual variant. Default: "solid". */
|
|
8
|
+
variant?: TabsVariant;
|
|
9
|
+
/** Size preset. Default: "md". */
|
|
10
|
+
size?: TabsSize;
|
|
11
|
+
/** Stretch triggers to fill the list width. */
|
|
12
|
+
fitted?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Chakra-compat. Radix mounts lazily by default (content only
|
|
15
|
+
* renders when active). Kept so call-sites don't break at compile time.
|
|
16
|
+
*/
|
|
17
|
+
lazyMount?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Chakra-compat. Radix unmounts inactive content by default.
|
|
20
|
+
* Kept so call-sites don't break at compile time.
|
|
21
|
+
*/
|
|
22
|
+
unmountOnExit?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Chakra-compatible value-change handler.
|
|
25
|
+
* Accepts both `(details: { value: string }) => void` (Chakra convention)
|
|
26
|
+
* and `(value: string) => void` (Radix convention).
|
|
27
|
+
*/
|
|
28
|
+
onValueChange?: ((details: {
|
|
29
|
+
value: string;
|
|
30
|
+
}) => void) | ((value: string) => void);
|
|
31
|
+
}
|
|
32
|
+
declare const TabsRoot: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
loop?: boolean;
|
|
36
|
+
flexWrap?: string;
|
|
37
|
+
alignItems?: string;
|
|
38
|
+
whiteSpace?: string;
|
|
39
|
+
bgColor?: string;
|
|
40
|
+
marginBottom?: number | string;
|
|
41
|
+
mx?: string | Record<string, string>;
|
|
42
|
+
px?: string | Record<string, string>;
|
|
43
|
+
w?: string | Record<string, string>;
|
|
44
|
+
overflowX?: string | Record<string, string>;
|
|
45
|
+
overscrollBehaviorX?: string;
|
|
46
|
+
css?: Record<string, unknown>;
|
|
47
|
+
position?: string;
|
|
48
|
+
boxShadow?: string | Record<string, string>;
|
|
49
|
+
top?: number | string;
|
|
50
|
+
zIndex?: string | Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
interface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>, 'dir'> {
|
|
54
|
+
scrollSnapAlign?: string;
|
|
55
|
+
flexShrink?: number;
|
|
56
|
+
bgColor?: string | Record<string, string>;
|
|
57
|
+
w?: string;
|
|
58
|
+
py?: string;
|
|
59
|
+
borderRadius?: string;
|
|
60
|
+
fontWeight?: string;
|
|
61
|
+
color?: string;
|
|
62
|
+
_hover?: Record<string, string>;
|
|
63
|
+
position?: string;
|
|
64
|
+
top?: string;
|
|
65
|
+
left?: string;
|
|
66
|
+
visibility?: string;
|
|
67
|
+
}
|
|
68
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
+
interface TabsContentProps extends React.ComponentPropsWithoutRef<typeof RadixTabs.Content> {
|
|
70
|
+
padding?: number | string;
|
|
71
|
+
}
|
|
72
|
+
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
interface TabsCounterProps {
|
|
74
|
+
count?: number | null;
|
|
75
|
+
}
|
|
76
|
+
declare const TabsCounter: ({ count }: TabsCounterProps) => React.ReactElement | null;
|
|
77
|
+
|
|
78
|
+
export { TabsContent, type TabsContentProps, TabsCounter, type TabsCounterProps, TabsList, type TabsListProps, type TabsProps, TabsRoot, TabsTrigger, type TabsTriggerProps };
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type TabsVariant = 'solid' | 'secondary' | 'segmented' | 'unstyled';
|
|
5
|
+
type TabsSize = 'sm' | 'md' | 'free';
|
|
6
|
+
interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'onValueChange'> {
|
|
7
|
+
/** Visual variant. Default: "solid". */
|
|
8
|
+
variant?: TabsVariant;
|
|
9
|
+
/** Size preset. Default: "md". */
|
|
10
|
+
size?: TabsSize;
|
|
11
|
+
/** Stretch triggers to fill the list width. */
|
|
12
|
+
fitted?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Chakra-compat. Radix mounts lazily by default (content only
|
|
15
|
+
* renders when active). Kept so call-sites don't break at compile time.
|
|
16
|
+
*/
|
|
17
|
+
lazyMount?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Chakra-compat. Radix unmounts inactive content by default.
|
|
20
|
+
* Kept so call-sites don't break at compile time.
|
|
21
|
+
*/
|
|
22
|
+
unmountOnExit?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Chakra-compatible value-change handler.
|
|
25
|
+
* Accepts both `(details: { value: string }) => void` (Chakra convention)
|
|
26
|
+
* and `(value: string) => void` (Radix convention).
|
|
27
|
+
*/
|
|
28
|
+
onValueChange?: ((details: {
|
|
29
|
+
value: string;
|
|
30
|
+
}) => void) | ((value: string) => void);
|
|
31
|
+
}
|
|
32
|
+
declare const TabsRoot: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
loop?: boolean;
|
|
36
|
+
flexWrap?: string;
|
|
37
|
+
alignItems?: string;
|
|
38
|
+
whiteSpace?: string;
|
|
39
|
+
bgColor?: string;
|
|
40
|
+
marginBottom?: number | string;
|
|
41
|
+
mx?: string | Record<string, string>;
|
|
42
|
+
px?: string | Record<string, string>;
|
|
43
|
+
w?: string | Record<string, string>;
|
|
44
|
+
overflowX?: string | Record<string, string>;
|
|
45
|
+
overscrollBehaviorX?: string;
|
|
46
|
+
css?: Record<string, unknown>;
|
|
47
|
+
position?: string;
|
|
48
|
+
boxShadow?: string | Record<string, string>;
|
|
49
|
+
top?: number | string;
|
|
50
|
+
zIndex?: string | Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
interface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>, 'dir'> {
|
|
54
|
+
scrollSnapAlign?: string;
|
|
55
|
+
flexShrink?: number;
|
|
56
|
+
bgColor?: string | Record<string, string>;
|
|
57
|
+
w?: string;
|
|
58
|
+
py?: string;
|
|
59
|
+
borderRadius?: string;
|
|
60
|
+
fontWeight?: string;
|
|
61
|
+
color?: string;
|
|
62
|
+
_hover?: Record<string, string>;
|
|
63
|
+
position?: string;
|
|
64
|
+
top?: string;
|
|
65
|
+
left?: string;
|
|
66
|
+
visibility?: string;
|
|
67
|
+
}
|
|
68
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
+
interface TabsContentProps extends React.ComponentPropsWithoutRef<typeof RadixTabs.Content> {
|
|
70
|
+
padding?: number | string;
|
|
71
|
+
}
|
|
72
|
+
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
interface TabsCounterProps {
|
|
74
|
+
count?: number | null;
|
|
75
|
+
}
|
|
76
|
+
declare const TabsCounter: ({ count }: TabsCounterProps) => React.ReactElement | null;
|
|
77
|
+
|
|
78
|
+
export { TabsContent, type TabsContentProps, TabsCounter, type TabsCounterProps, TabsList, type TabsListProps, type TabsProps, TabsRoot, TabsTrigger, type TabsTriggerProps };
|
package/dist/tag.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
|
|
6
|
+
readonly variant?: TagVariant;
|
|
7
|
+
readonly size?: TagSize;
|
|
8
|
+
readonly startElement?: React.ReactNode;
|
|
9
|
+
readonly endElement?: React.ReactNode;
|
|
10
|
+
readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
readonly onClose?: VoidFunction;
|
|
13
|
+
readonly closable?: boolean;
|
|
14
|
+
readonly truncated?: boolean;
|
|
15
|
+
readonly loading?: boolean;
|
|
16
|
+
readonly selected?: boolean;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { Tag, type TagProps };
|
package/dist/tag.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
|
|
6
|
+
readonly variant?: TagVariant;
|
|
7
|
+
readonly size?: TagSize;
|
|
8
|
+
readonly startElement?: React.ReactNode;
|
|
9
|
+
readonly endElement?: React.ReactNode;
|
|
10
|
+
readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
readonly onClose?: VoidFunction;
|
|
13
|
+
readonly closable?: boolean;
|
|
14
|
+
readonly truncated?: boolean;
|
|
15
|
+
readonly loading?: boolean;
|
|
16
|
+
readonly selected?: boolean;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { Tag, type TagProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
|
4
|
+
type TextareaVariant = 'outline' | 'filled' | 'unstyled';
|
|
5
|
+
interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
|
|
6
|
+
readonly size?: TextareaSize;
|
|
7
|
+
readonly variant?: TextareaVariant;
|
|
8
|
+
}
|
|
9
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
|
|
11
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
|
4
|
+
type TextareaVariant = 'outline' | 'filled' | 'unstyled';
|
|
5
|
+
interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
|
|
6
|
+
readonly size?: TextareaSize;
|
|
7
|
+
readonly variant?: TextareaVariant;
|
|
8
|
+
}
|
|
9
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
|
|
11
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ToastOptions {
|
|
4
|
+
readonly id?: string | number;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
readonly action?: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
readonly onStatusChange?: (details: {
|
|
14
|
+
readonly status: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function create(opts: ToastOptions): string | number;
|
|
18
|
+
declare function update(id: string | number, opts: ToastOptions): void;
|
|
19
|
+
declare const toaster: {
|
|
20
|
+
readonly create: typeof create;
|
|
21
|
+
readonly success: (opts: ToastOptions) => string | number;
|
|
22
|
+
readonly error: (opts: ToastOptions) => string | number;
|
|
23
|
+
readonly loading: (opts: ToastOptions) => string | number;
|
|
24
|
+
readonly update: typeof update;
|
|
25
|
+
readonly remove: (id: string | number) => string | number;
|
|
26
|
+
};
|
|
27
|
+
declare const Toaster: React__default.FC;
|
|
28
|
+
|
|
29
|
+
export { Toaster, toaster };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ToastOptions {
|
|
4
|
+
readonly id?: string | number;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
readonly action?: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
readonly onStatusChange?: (details: {
|
|
14
|
+
readonly status: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function create(opts: ToastOptions): string | number;
|
|
18
|
+
declare function update(id: string | number, opts: ToastOptions): void;
|
|
19
|
+
declare const toaster: {
|
|
20
|
+
readonly create: typeof create;
|
|
21
|
+
readonly success: (opts: ToastOptions) => string | number;
|
|
22
|
+
readonly error: (opts: ToastOptions) => string | number;
|
|
23
|
+
readonly loading: (opts: ToastOptions) => string | number;
|
|
24
|
+
readonly update: typeof update;
|
|
25
|
+
readonly remove: (id: string | number) => string | number;
|
|
26
|
+
};
|
|
27
|
+
declare const Toaster: React__default.FC;
|
|
28
|
+
|
|
29
|
+
export { Toaster, toaster };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
showArrow?: boolean;
|
|
6
|
+
portalled?: boolean;
|
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disableOnMobile?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
variant?: string;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
onOpenChange?: (details: {
|
|
18
|
+
open: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
closeDelay?: number;
|
|
21
|
+
openDelay?: number;
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
lazyMount?: boolean;
|
|
24
|
+
unmountOnExit?: boolean;
|
|
25
|
+
positioning?: {
|
|
26
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
27
|
+
overflowPadding?: number;
|
|
28
|
+
offset?: {
|
|
29
|
+
mainAxis?: number;
|
|
30
|
+
crossAxis?: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
closeOnClick?: boolean;
|
|
34
|
+
closeOnPointerDown?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
|
|
38
|
+
export { Tooltip, type TooltipProps };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
showArrow?: boolean;
|
|
6
|
+
portalled?: boolean;
|
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disableOnMobile?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
variant?: string;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
onOpenChange?: (details: {
|
|
18
|
+
open: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
closeDelay?: number;
|
|
21
|
+
openDelay?: number;
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
lazyMount?: boolean;
|
|
24
|
+
unmountOnExit?: boolean;
|
|
25
|
+
positioning?: {
|
|
26
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
27
|
+
overflowPadding?: number;
|
|
28
|
+
offset?: {
|
|
29
|
+
mainAxis?: number;
|
|
30
|
+
crossAxis?: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
closeOnClick?: boolean;
|
|
34
|
+
closeOnPointerDown?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
|
|
38
|
+
export { Tooltip, type TooltipProps };
|
package/dist/utils.d.cts
ADDED
package/dist/utils.d.ts
ADDED
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/provider.tsx
CHANGED
|
@@ -4,14 +4,14 @@ import { createGui } from '@hanzogui/core';
|
|
|
4
4
|
import { QueryClient, QueryClientProvider, useQueryClient, useQuery, useMutation, useInfiniteQuery } from '@tanstack/react-query';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
// Initialize @hanzogui once at module load
|
|
7
|
+
// Initialize @hanzogui once — lazy, not at module load (would crash Node/SSR).
|
|
8
8
|
let _guiInitialized = false;
|
|
9
9
|
function ensureGui() {
|
|
10
10
|
if (_guiInitialized) return;
|
|
11
|
+
if (typeof window === 'undefined') return;
|
|
11
12
|
createGui({ settings: { autocompleteSpecificTokens: 'except-special' } });
|
|
12
13
|
_guiInitialized = true;
|
|
13
14
|
}
|
|
14
|
-
ensureGui();
|
|
15
15
|
|
|
16
16
|
const defaultQueryClient = new QueryClient({
|
|
17
17
|
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 30_000 } },
|
|
@@ -23,6 +23,7 @@ interface AppProviderProps {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export const AppProvider = ({ children, queryClient }: AppProviderProps) => {
|
|
26
|
+
React.useEffect(() => { ensureGui(); }, []);
|
|
26
27
|
return (
|
|
27
28
|
<QueryClientProvider client={ queryClient ?? defaultQueryClient }>
|
|
28
29
|
{ children }
|