@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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Positioning {
|
|
4
|
+
readonly placement?: string;
|
|
5
|
+
readonly offset?: {
|
|
6
|
+
readonly mainAxis?: number;
|
|
7
|
+
readonly crossAxis?: number;
|
|
8
|
+
};
|
|
9
|
+
readonly overflowPadding?: number;
|
|
10
|
+
}
|
|
11
|
+
interface PopoverRootProps {
|
|
12
|
+
readonly children?: React.ReactNode;
|
|
13
|
+
readonly open?: boolean;
|
|
14
|
+
readonly defaultOpen?: boolean;
|
|
15
|
+
/** Chakra-style callback: receives `{ open: boolean }` */
|
|
16
|
+
readonly onOpenChange?: (details: {
|
|
17
|
+
open: boolean;
|
|
18
|
+
}) => void;
|
|
19
|
+
readonly positioning?: Positioning;
|
|
20
|
+
readonly lazyMount?: boolean;
|
|
21
|
+
readonly unmountOnExit?: boolean;
|
|
22
|
+
readonly autoFocus?: boolean;
|
|
23
|
+
readonly closeOnInteractOutside?: boolean;
|
|
24
|
+
readonly modal?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const PopoverRoot: (props: PopoverRootProps) => React.ReactElement;
|
|
27
|
+
interface PopoverTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
28
|
+
readonly asChild?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
interface PopoverContentProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
32
|
+
readonly portalled?: boolean;
|
|
33
|
+
readonly portalRef?: React.RefObject<HTMLElement>;
|
|
34
|
+
readonly w?: string | Record<string, string>;
|
|
35
|
+
readonly minW?: string;
|
|
36
|
+
readonly maxW?: string;
|
|
37
|
+
readonly paddingTop?: number | string;
|
|
38
|
+
}
|
|
39
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
interface PopoverArrowProps extends React.ComponentPropsWithoutRef<'svg'> {
|
|
41
|
+
}
|
|
42
|
+
declare const PopoverArrow: React.ForwardRefExoticComponent<PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
43
|
+
interface PopoverCloseTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
44
|
+
}
|
|
45
|
+
declare const PopoverCloseTrigger: React.ForwardRefExoticComponent<PopoverCloseTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
interface PopoverCloseTriggerWrapperProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
47
|
+
readonly disabled?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const PopoverCloseTriggerWrapper: React.ForwardRefExoticComponent<PopoverCloseTriggerWrapperProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
interface PopoverBodyProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
51
|
+
readonly display?: string;
|
|
52
|
+
readonly flexDir?: string;
|
|
53
|
+
readonly rowGap?: number | string;
|
|
54
|
+
readonly px?: number | string;
|
|
55
|
+
readonly py?: number | string;
|
|
56
|
+
readonly textStyle?: string;
|
|
57
|
+
readonly alignItems?: string;
|
|
58
|
+
}
|
|
59
|
+
declare const PopoverBody: React.ForwardRefExoticComponent<PopoverBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
60
|
+
interface PopoverHeaderProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
61
|
+
}
|
|
62
|
+
declare const PopoverHeader: React.ForwardRefExoticComponent<PopoverHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
interface PopoverFooterProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
64
|
+
}
|
|
65
|
+
declare const PopoverFooter: React.ForwardRefExoticComponent<PopoverFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
interface PopoverTitleProps extends React.ComponentPropsWithoutRef<'h3'> {
|
|
67
|
+
}
|
|
68
|
+
declare const PopoverTitle: React.ForwardRefExoticComponent<PopoverTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
69
|
+
interface PopoverDescriptionProps extends React.ComponentPropsWithoutRef<'p'> {
|
|
70
|
+
}
|
|
71
|
+
declare const PopoverDescription: React.ForwardRefExoticComponent<PopoverDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
72
|
+
|
|
73
|
+
export { PopoverArrow, type PopoverArrowProps, PopoverBody, type PopoverBodyProps, PopoverCloseTrigger, type PopoverCloseTriggerProps, PopoverCloseTriggerWrapper, type PopoverCloseTriggerWrapperProps, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverFooter, type PopoverFooterProps, PopoverHeader, type PopoverHeaderProps, PopoverRoot, type PopoverRootProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_MAP: {
|
|
4
|
+
readonly xs: {
|
|
5
|
+
readonly size: 24;
|
|
6
|
+
readonly thickness: 4;
|
|
7
|
+
readonly textClass: "text-[10px]";
|
|
8
|
+
};
|
|
9
|
+
readonly sm: {
|
|
10
|
+
readonly size: 32;
|
|
11
|
+
readonly thickness: 5;
|
|
12
|
+
readonly textClass: "text-[10px]";
|
|
13
|
+
};
|
|
14
|
+
readonly md: {
|
|
15
|
+
readonly size: 40;
|
|
16
|
+
readonly thickness: 6;
|
|
17
|
+
readonly textClass: "text-xs";
|
|
18
|
+
};
|
|
19
|
+
readonly lg: {
|
|
20
|
+
readonly size: 48;
|
|
21
|
+
readonly thickness: 7;
|
|
22
|
+
readonly textClass: "text-sm";
|
|
23
|
+
};
|
|
24
|
+
readonly xl: {
|
|
25
|
+
readonly size: 64;
|
|
26
|
+
readonly thickness: 8;
|
|
27
|
+
readonly textClass: "text-sm";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type Size = keyof typeof SIZE_MAP;
|
|
31
|
+
interface ProgressCircleRootProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
32
|
+
readonly value?: number | null;
|
|
33
|
+
readonly size?: Size;
|
|
34
|
+
readonly colorPalette?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const ProgressCircleRoot: React.ForwardRefExoticComponent<ProgressCircleRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
interface ProgressCircleRingProps extends Omit<React.SVGAttributes<SVGSVGElement>, 'color'> {
|
|
38
|
+
readonly trackColor?: string;
|
|
39
|
+
readonly cap?: React.SVGAttributes<SVGCircleElement>['strokeLinecap'];
|
|
40
|
+
readonly color?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const ProgressCircleRing: React.ForwardRefExoticComponent<ProgressCircleRingProps & React.RefAttributes<SVGSVGElement>>;
|
|
43
|
+
interface ProgressCircleValueTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
}
|
|
45
|
+
declare const ProgressCircleValueText: React.ForwardRefExoticComponent<ProgressCircleValueTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
|
|
47
|
+
export { ProgressCircleRing, type ProgressCircleRingProps, ProgressCircleRoot, type ProgressCircleRootProps, ProgressCircleValueText, type ProgressCircleValueTextProps };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_MAP: {
|
|
4
|
+
readonly xs: {
|
|
5
|
+
readonly size: 24;
|
|
6
|
+
readonly thickness: 4;
|
|
7
|
+
readonly textClass: "text-[10px]";
|
|
8
|
+
};
|
|
9
|
+
readonly sm: {
|
|
10
|
+
readonly size: 32;
|
|
11
|
+
readonly thickness: 5;
|
|
12
|
+
readonly textClass: "text-[10px]";
|
|
13
|
+
};
|
|
14
|
+
readonly md: {
|
|
15
|
+
readonly size: 40;
|
|
16
|
+
readonly thickness: 6;
|
|
17
|
+
readonly textClass: "text-xs";
|
|
18
|
+
};
|
|
19
|
+
readonly lg: {
|
|
20
|
+
readonly size: 48;
|
|
21
|
+
readonly thickness: 7;
|
|
22
|
+
readonly textClass: "text-sm";
|
|
23
|
+
};
|
|
24
|
+
readonly xl: {
|
|
25
|
+
readonly size: 64;
|
|
26
|
+
readonly thickness: 8;
|
|
27
|
+
readonly textClass: "text-sm";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type Size = keyof typeof SIZE_MAP;
|
|
31
|
+
interface ProgressCircleRootProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
32
|
+
readonly value?: number | null;
|
|
33
|
+
readonly size?: Size;
|
|
34
|
+
readonly colorPalette?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const ProgressCircleRoot: React.ForwardRefExoticComponent<ProgressCircleRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
interface ProgressCircleRingProps extends Omit<React.SVGAttributes<SVGSVGElement>, 'color'> {
|
|
38
|
+
readonly trackColor?: string;
|
|
39
|
+
readonly cap?: React.SVGAttributes<SVGCircleElement>['strokeLinecap'];
|
|
40
|
+
readonly color?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const ProgressCircleRing: React.ForwardRefExoticComponent<ProgressCircleRingProps & React.RefAttributes<SVGSVGElement>>;
|
|
43
|
+
interface ProgressCircleValueTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
}
|
|
45
|
+
declare const ProgressCircleValueText: React.ForwardRefExoticComponent<ProgressCircleValueTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
|
|
47
|
+
export { ProgressCircleRing, type ProgressCircleRingProps, ProgressCircleRoot, type ProgressCircleRootProps, ProgressCircleValueText, type ProgressCircleValueTextProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_CLASSES: {
|
|
4
|
+
readonly sm: "h-1";
|
|
5
|
+
readonly md: "h-2";
|
|
6
|
+
readonly lg: "h-3";
|
|
7
|
+
readonly xl: "h-4";
|
|
8
|
+
};
|
|
9
|
+
type Size = keyof typeof SIZE_CLASSES;
|
|
10
|
+
interface TrackProps {
|
|
11
|
+
readonly borderStartRadius?: number | string;
|
|
12
|
+
readonly borderEndRadius?: number | string;
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
readonly style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
interface ProgressProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
17
|
+
readonly value?: number | null;
|
|
18
|
+
readonly min?: number;
|
|
19
|
+
readonly max?: number;
|
|
20
|
+
readonly size?: Size;
|
|
21
|
+
readonly color?: string;
|
|
22
|
+
readonly trackProps?: TrackProps;
|
|
23
|
+
readonly w?: string;
|
|
24
|
+
readonly flex?: string | number;
|
|
25
|
+
}
|
|
26
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
export { Progress };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_CLASSES: {
|
|
4
|
+
readonly sm: "h-1";
|
|
5
|
+
readonly md: "h-2";
|
|
6
|
+
readonly lg: "h-3";
|
|
7
|
+
readonly xl: "h-4";
|
|
8
|
+
};
|
|
9
|
+
type Size = keyof typeof SIZE_CLASSES;
|
|
10
|
+
interface TrackProps {
|
|
11
|
+
readonly borderStartRadius?: number | string;
|
|
12
|
+
readonly borderEndRadius?: number | string;
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
readonly style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
interface ProgressProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
17
|
+
readonly value?: number | null;
|
|
18
|
+
readonly min?: number;
|
|
19
|
+
readonly max?: number;
|
|
20
|
+
readonly size?: Size;
|
|
21
|
+
readonly color?: string;
|
|
22
|
+
readonly trackProps?: TrackProps;
|
|
23
|
+
readonly w?: string;
|
|
24
|
+
readonly flex?: string | number;
|
|
25
|
+
}
|
|
26
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
export { Progress };
|
package/dist/provider.cjs
CHANGED
|
@@ -3,19 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
var core = require('@hanzogui/core');
|
|
5
5
|
var reactQuery = require('@tanstack/react-query');
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
12
|
+
|
|
8
13
|
var _guiInitialized = false;
|
|
9
14
|
function ensureGui() {
|
|
10
15
|
if (_guiInitialized) return;
|
|
16
|
+
if (typeof window === "undefined") return;
|
|
11
17
|
core.createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
12
18
|
_guiInitialized = true;
|
|
13
19
|
}
|
|
14
|
-
ensureGui();
|
|
15
20
|
var defaultQueryClient = new reactQuery.QueryClient({
|
|
16
21
|
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
17
22
|
});
|
|
18
23
|
var AppProvider = ({ children, queryClient }) => {
|
|
24
|
+
React__default.default.useEffect(() => {
|
|
25
|
+
ensureGui();
|
|
26
|
+
}, []);
|
|
19
27
|
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
20
28
|
};
|
|
21
29
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
export { QueryClient, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
|
|
6
|
+
interface AppProviderProps {
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
queryClient?: QueryClient;
|
|
9
|
+
}
|
|
10
|
+
declare const AppProvider: ({ children, queryClient }: AppProviderProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { AppProvider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
export { QueryClient, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
|
|
6
|
+
interface AppProviderProps {
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
queryClient?: QueryClient;
|
|
9
|
+
}
|
|
10
|
+
declare const AppProvider: ({ children, queryClient }: AppProviderProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { AppProvider };
|
package/dist/provider.js
CHANGED
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
import { createGui } from '@hanzogui/core';
|
|
3
3
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
4
4
|
export { QueryClient, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
5
|
+
import React from 'react';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
var _guiInitialized = false;
|
|
8
9
|
function ensureGui() {
|
|
9
10
|
if (_guiInitialized) return;
|
|
11
|
+
if (typeof window === "undefined") return;
|
|
10
12
|
createGui({ settings: { autocompleteSpecificTokens: "except-special" } });
|
|
11
13
|
_guiInitialized = true;
|
|
12
14
|
}
|
|
13
|
-
ensureGui();
|
|
14
15
|
var defaultQueryClient = new QueryClient({
|
|
15
16
|
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 3e4 } }
|
|
16
17
|
});
|
|
17
18
|
var AppProvider = ({ children, queryClient }) => {
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
ensureGui();
|
|
21
|
+
}, []);
|
|
18
22
|
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient ?? defaultQueryClient, children });
|
|
19
23
|
};
|
|
20
24
|
|
package/dist/radio.d.cts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_CLASSES: {
|
|
4
|
+
readonly xs: {
|
|
5
|
+
readonly root: "gap-1.5";
|
|
6
|
+
readonly control: "h-3 w-3";
|
|
7
|
+
readonly indicator: "h-1.5 w-1.5";
|
|
8
|
+
readonly label: "text-xs";
|
|
9
|
+
};
|
|
10
|
+
readonly sm: {
|
|
11
|
+
readonly root: "gap-1.5";
|
|
12
|
+
readonly control: "h-3.5 w-3.5";
|
|
13
|
+
readonly indicator: "h-1.5 w-1.5";
|
|
14
|
+
readonly label: "text-xs";
|
|
15
|
+
};
|
|
16
|
+
readonly md: {
|
|
17
|
+
readonly root: "gap-2";
|
|
18
|
+
readonly control: "h-4 w-4";
|
|
19
|
+
readonly indicator: "h-2 w-2";
|
|
20
|
+
readonly label: "text-sm";
|
|
21
|
+
};
|
|
22
|
+
readonly lg: {
|
|
23
|
+
readonly root: "gap-2.5";
|
|
24
|
+
readonly control: "h-5 w-5";
|
|
25
|
+
readonly indicator: "h-2.5 w-2.5";
|
|
26
|
+
readonly label: "text-base";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type RadioSize = keyof typeof SIZE_CLASSES;
|
|
30
|
+
interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
|
|
31
|
+
name?: string;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
orientation?: 'horizontal' | 'vertical';
|
|
36
|
+
loop?: boolean;
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
value?: string | null;
|
|
39
|
+
onValueChange?: (details: {
|
|
40
|
+
value: string | null;
|
|
41
|
+
}) => void;
|
|
42
|
+
size?: RadioSize;
|
|
43
|
+
}
|
|
44
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
interface RadioProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
46
|
+
rootRef?: React.Ref<HTMLLabelElement>;
|
|
47
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
48
|
+
value: string;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
52
|
+
|
|
53
|
+
export { Radio, RadioGroup, type RadioGroupProps, type RadioProps };
|
package/dist/radio.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const SIZE_CLASSES: {
|
|
4
|
+
readonly xs: {
|
|
5
|
+
readonly root: "gap-1.5";
|
|
6
|
+
readonly control: "h-3 w-3";
|
|
7
|
+
readonly indicator: "h-1.5 w-1.5";
|
|
8
|
+
readonly label: "text-xs";
|
|
9
|
+
};
|
|
10
|
+
readonly sm: {
|
|
11
|
+
readonly root: "gap-1.5";
|
|
12
|
+
readonly control: "h-3.5 w-3.5";
|
|
13
|
+
readonly indicator: "h-1.5 w-1.5";
|
|
14
|
+
readonly label: "text-xs";
|
|
15
|
+
};
|
|
16
|
+
readonly md: {
|
|
17
|
+
readonly root: "gap-2";
|
|
18
|
+
readonly control: "h-4 w-4";
|
|
19
|
+
readonly indicator: "h-2 w-2";
|
|
20
|
+
readonly label: "text-sm";
|
|
21
|
+
};
|
|
22
|
+
readonly lg: {
|
|
23
|
+
readonly root: "gap-2.5";
|
|
24
|
+
readonly control: "h-5 w-5";
|
|
25
|
+
readonly indicator: "h-2.5 w-2.5";
|
|
26
|
+
readonly label: "text-base";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type RadioSize = keyof typeof SIZE_CLASSES;
|
|
30
|
+
interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
|
|
31
|
+
name?: string;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
orientation?: 'horizontal' | 'vertical';
|
|
36
|
+
loop?: boolean;
|
|
37
|
+
defaultValue?: string;
|
|
38
|
+
value?: string | null;
|
|
39
|
+
onValueChange?: (details: {
|
|
40
|
+
value: string | null;
|
|
41
|
+
}) => void;
|
|
42
|
+
size?: RadioSize;
|
|
43
|
+
}
|
|
44
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
interface RadioProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
46
|
+
rootRef?: React.Ref<HTMLLabelElement>;
|
|
47
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
48
|
+
value: string;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
52
|
+
|
|
53
|
+
export { Radio, RadioGroup, type RadioGroupProps, type RadioProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
4
|
+
count?: number;
|
|
5
|
+
label?: string | Array<string>;
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
onValueChange?: ({ value }: {
|
|
8
|
+
value: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { Rating, type RatingProps };
|
package/dist/rating.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
4
|
+
count?: number;
|
|
5
|
+
label?: string | Array<string>;
|
|
6
|
+
defaultValue?: number;
|
|
7
|
+
onValueChange?: ({ value }: {
|
|
8
|
+
value: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { Rating, type RatingProps };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as RadixSelect from '@radix-ui/react-select';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface ListCollection<T> {
|
|
5
|
+
items: Array<T>;
|
|
6
|
+
}
|
|
7
|
+
declare function createListCollection<T>(config: {
|
|
8
|
+
items: Array<T>;
|
|
9
|
+
}): ListCollection<T>;
|
|
10
|
+
type ViewMode = 'default' | 'compact';
|
|
11
|
+
interface SelectOption<Value extends string = string> {
|
|
12
|
+
label: string;
|
|
13
|
+
renderLabel?: (place: 'item' | 'value-text') => React.ReactNode;
|
|
14
|
+
value: Value;
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
afterElement?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface SelectRootProps {
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
collection?: ListCollection<SelectOption>;
|
|
21
|
+
defaultValue?: Array<string>;
|
|
22
|
+
value?: Array<string>;
|
|
23
|
+
onValueChange?: (details: {
|
|
24
|
+
value: Array<string>;
|
|
25
|
+
items: Array<SelectOption>;
|
|
26
|
+
}) => void;
|
|
27
|
+
onInteractOutside?: () => void;
|
|
28
|
+
name?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
readOnly?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
size?: 'sm' | 'lg';
|
|
34
|
+
variant?: string;
|
|
35
|
+
open?: boolean;
|
|
36
|
+
defaultOpen?: boolean;
|
|
37
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
positioning?: {
|
|
39
|
+
sameWidth?: boolean;
|
|
40
|
+
offset?: {
|
|
41
|
+
mainAxis?: number;
|
|
42
|
+
crossAxis?: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
lazyMount?: boolean;
|
|
46
|
+
unmountOnExit?: boolean;
|
|
47
|
+
asChild?: boolean;
|
|
48
|
+
className?: string;
|
|
49
|
+
style?: React.CSSProperties;
|
|
50
|
+
w?: string | Record<string, string>;
|
|
51
|
+
maxW?: string | Record<string, string>;
|
|
52
|
+
minW?: string | Record<string, string>;
|
|
53
|
+
hideFrom?: string;
|
|
54
|
+
}
|
|
55
|
+
declare const SelectRoot: React.ForwardRefExoticComponent<SelectRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
interface SelectControlProps {
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
noIndicator?: boolean;
|
|
59
|
+
triggerProps?: React.ComponentPropsWithoutRef<typeof RadixSelect.Trigger> & {
|
|
60
|
+
asChild?: boolean;
|
|
61
|
+
px?: string | number;
|
|
62
|
+
className?: string;
|
|
63
|
+
};
|
|
64
|
+
loading?: boolean;
|
|
65
|
+
defaultValue?: Array<string>;
|
|
66
|
+
className?: string;
|
|
67
|
+
style?: React.CSSProperties;
|
|
68
|
+
}
|
|
69
|
+
declare const SelectControl: React.ForwardRefExoticComponent<SelectControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
interface SelectClearTriggerProps {
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
declare const SelectClearTrigger: React.ForwardRefExoticComponent<SelectClearTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
interface SelectContentProps {
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
portalled?: boolean;
|
|
77
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
78
|
+
className?: string;
|
|
79
|
+
style?: React.CSSProperties;
|
|
80
|
+
}
|
|
81
|
+
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
interface SelectItemProps {
|
|
83
|
+
item: SelectOption;
|
|
84
|
+
children?: React.ReactNode;
|
|
85
|
+
className?: string;
|
|
86
|
+
}
|
|
87
|
+
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
interface SelectValueTextProps {
|
|
89
|
+
children?: (items: Array<SelectOption>) => React.ReactNode;
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
size?: SelectRootProps['size'];
|
|
92
|
+
required?: boolean;
|
|
93
|
+
invalid?: boolean;
|
|
94
|
+
errorText?: string;
|
|
95
|
+
mode?: ViewMode;
|
|
96
|
+
className?: string;
|
|
97
|
+
style?: React.CSSProperties;
|
|
98
|
+
}
|
|
99
|
+
declare const SelectValueText: React.ForwardRefExoticComponent<SelectValueTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
100
|
+
interface SelectItemGroupProps {
|
|
101
|
+
children?: React.ReactNode;
|
|
102
|
+
label: React.ReactNode;
|
|
103
|
+
className?: string;
|
|
104
|
+
}
|
|
105
|
+
declare const SelectItemGroup: React.ForwardRefExoticComponent<SelectItemGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<RadixSelect.SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
declare const SelectItemText: React.ForwardRefExoticComponent<RadixSelect.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
108
|
+
interface SelectProps extends SelectRootProps {
|
|
109
|
+
collection: ListCollection<SelectOption>;
|
|
110
|
+
placeholder: string;
|
|
111
|
+
portalled?: boolean;
|
|
112
|
+
loading?: boolean;
|
|
113
|
+
errorText?: string;
|
|
114
|
+
contentProps?: SelectContentProps;
|
|
115
|
+
contentHeader?: React.ReactNode;
|
|
116
|
+
itemFilter?: (item: SelectOption) => boolean;
|
|
117
|
+
mode?: ViewMode;
|
|
118
|
+
}
|
|
119
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
120
|
+
interface SelectAsyncProps extends Omit<SelectProps, 'collection'> {
|
|
121
|
+
placeholder: string;
|
|
122
|
+
portalled?: boolean;
|
|
123
|
+
loading?: boolean;
|
|
124
|
+
loadOptions: (input: string, currentValue: Array<string>) => Promise<ListCollection<SelectOption>>;
|
|
125
|
+
extraControls?: React.ReactNode;
|
|
126
|
+
mode?: ViewMode;
|
|
127
|
+
}
|
|
128
|
+
declare const SelectAsync: React.ForwardRefExoticComponent<SelectAsyncProps & React.RefAttributes<HTMLDivElement>>;
|
|
129
|
+
|
|
130
|
+
export { type ListCollection, Select, SelectAsync, type SelectAsyncProps, SelectClearTrigger, type SelectClearTriggerProps, SelectContent, type SelectContentProps, SelectControl, type SelectControlProps, SelectItem, SelectItemGroup, type SelectItemProps, SelectItemText, SelectLabel, type SelectOption, type SelectProps, SelectRoot, type SelectRootProps, SelectValueText, type ViewMode, createListCollection };
|