myshell-react-lib 0.2.17 → 0.2.19
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 +7395 -6944
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -22
- package/dist/index.d.ts +65 -22
- package/dist/index.js +7335 -6936
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17,7 +17,8 @@ import { Drawer as Drawer$1 } from 'vaul';
|
|
|
17
17
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
18
18
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
19
19
|
import * as react_hook_form from 'react-hook-form';
|
|
20
|
-
import { FieldValues, FieldPath, ControllerProps
|
|
20
|
+
import { UseFormReturn, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
21
|
+
export { Controller, ControllerProps, FieldPath, FieldValue, FieldValues, FormProvider, Mode, useForm, useFormContext, useWatch } from 'react-hook-form';
|
|
21
22
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
22
23
|
import { DriveStep } from 'driver.js';
|
|
23
24
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -134,7 +135,7 @@ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
|
134
135
|
declare const buttonVariants: (props?: ({
|
|
135
136
|
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "ghost" | "plain" | null | undefined;
|
|
136
137
|
color?: "default" | "brand" | "error" | null | undefined;
|
|
137
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
138
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
138
139
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
139
140
|
type VariantType$1 = 'primary' | 'secondary' | 'tertiary' | 'link' | 'plain' | 'opacity' | 'ghost' | 'static';
|
|
140
141
|
type ButtonBaseProps = VariantProps<typeof buttonVariants>;
|
|
@@ -194,9 +195,46 @@ declare const LinkButton: React$1.ForwardRefExoticComponent<LinkButtonProps & Re
|
|
|
194
195
|
|
|
195
196
|
interface CascaderOption {
|
|
196
197
|
label: string;
|
|
197
|
-
value
|
|
198
|
+
value?: string;
|
|
199
|
+
disabled?: boolean;
|
|
198
200
|
children?: CascaderOption[];
|
|
201
|
+
parent?: string;
|
|
202
|
+
}
|
|
203
|
+
interface CommonP {
|
|
204
|
+
value?: string;
|
|
205
|
+
defaultValue?: string;
|
|
206
|
+
onValueChange: (value: string, parent?: string) => void;
|
|
207
|
+
className?: ClassNameValue;
|
|
199
208
|
}
|
|
209
|
+
interface P extends CommonP {
|
|
210
|
+
options: CascaderOption[];
|
|
211
|
+
disabled?: boolean;
|
|
212
|
+
showParentLabel?: boolean;
|
|
213
|
+
placeholder?: string;
|
|
214
|
+
emptyText?: string;
|
|
215
|
+
clearByDefault?: boolean;
|
|
216
|
+
rounded?: "default" | "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
|
|
217
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
218
|
+
border?: "none" | "default" | null | undefined;
|
|
219
|
+
outline?: "none" | "default" | null | undefined;
|
|
220
|
+
background?: "none" | "default" | null | undefined;
|
|
221
|
+
}
|
|
222
|
+
declare function CascaderContent({ options, value, onValueChange, className, emptyText, buttonRef, }: {
|
|
223
|
+
options: CascaderOption[];
|
|
224
|
+
value?: string;
|
|
225
|
+
onValueChange: (value: string, parent?: string) => void;
|
|
226
|
+
className?: ClassNameValue;
|
|
227
|
+
emptyText?: string;
|
|
228
|
+
buttonRef: React__default.RefObject<HTMLButtonElement>;
|
|
229
|
+
}): react_jsx_runtime.JSX.Element;
|
|
230
|
+
declare function Cascader(props: P): react_jsx_runtime.JSX.Element;
|
|
231
|
+
|
|
232
|
+
declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
233
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
234
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
235
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
236
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
237
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
200
238
|
|
|
201
239
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
202
240
|
variant?: "circle" | "checkbox" | "radio" | "static" | null | undefined;
|
|
@@ -351,7 +389,7 @@ declare const DropdownMenuShortcut: {
|
|
|
351
389
|
type FormRef = UseFormReturn & {
|
|
352
390
|
submit: () => void;
|
|
353
391
|
};
|
|
354
|
-
declare const Form: <
|
|
392
|
+
declare const Form: React$1.ForwardRefExoticComponent<Omit<Omit<any, "ref">, "ref"> & React$1.RefAttributes<UseFormReturn>>;
|
|
355
393
|
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
356
394
|
declare const useFormField: () => {
|
|
357
395
|
invalid: boolean;
|
|
@@ -533,14 +571,14 @@ interface ImageProps {
|
|
|
533
571
|
}
|
|
534
572
|
declare function Image({ className, imgClassName, placeholder, width, height, src, rounded, fallback, object, isBackgroud, preview, fetchPriority, loading, ...otherProps }: ImageProps): react_jsx_runtime.JSX.Element;
|
|
535
573
|
|
|
536
|
-
type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
537
|
-
rounded?:
|
|
538
|
-
size?:
|
|
574
|
+
type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
575
|
+
rounded?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | null | undefined;
|
|
576
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
539
577
|
isFull?: boolean;
|
|
540
|
-
border?:
|
|
541
|
-
shadow?:
|
|
542
|
-
outline?:
|
|
543
|
-
background?:
|
|
578
|
+
border?: "none" | "default" | null | undefined;
|
|
579
|
+
shadow?: "none" | "default" | null | undefined;
|
|
580
|
+
outline?: "none" | "default" | null | undefined;
|
|
581
|
+
background?: "none" | "default" | null | undefined;
|
|
544
582
|
showLength?: boolean;
|
|
545
583
|
rootClassName?: string;
|
|
546
584
|
};
|
|
@@ -600,11 +638,15 @@ interface LinkProps {
|
|
|
600
638
|
* 是否是移动端
|
|
601
639
|
*/
|
|
602
640
|
isMobile?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* 是否需要做移动端路由
|
|
643
|
+
*/
|
|
644
|
+
mobRoute?: boolean;
|
|
603
645
|
onClick?: (e: any) => void;
|
|
604
646
|
children?: React.ReactNode;
|
|
605
647
|
[key: string]: any;
|
|
606
648
|
}
|
|
607
|
-
declare function Link({ className, href, scroll, replace, prefetch, back, children, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
649
|
+
declare function Link({ className, href, scroll, replace, prefetch, back, children, mobRoute, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
608
650
|
|
|
609
651
|
interface BreakpointColsObject {
|
|
610
652
|
default: number;
|
|
@@ -809,9 +851,9 @@ type IMiddleBar = {
|
|
|
809
851
|
};
|
|
810
852
|
declare function MiddleBar({ showSearchBar, searchValue, searchPlaceholder, title, children, energy, dailyEnergy, onSearchChange, }: IMiddleBar): react_jsx_runtime.JSX.Element;
|
|
811
853
|
|
|
812
|
-
type INumberInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
813
|
-
rounded?:
|
|
814
|
-
size?:
|
|
854
|
+
type INumberInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
855
|
+
rounded?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | null | undefined;
|
|
856
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
815
857
|
isFull?: boolean;
|
|
816
858
|
controls?: boolean;
|
|
817
859
|
};
|
|
@@ -1044,17 +1086,17 @@ interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
|
1044
1086
|
placeholder?: React$1.ReactNode;
|
|
1045
1087
|
triggerClassName?: string;
|
|
1046
1088
|
contentClassName?: string;
|
|
1047
|
-
variant?:
|
|
1048
|
-
size?:
|
|
1089
|
+
variant?: "input" | "button";
|
|
1090
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
1049
1091
|
noPortal?: boolean;
|
|
1050
|
-
side?: SelectPrimitive.SelectContentProps[
|
|
1092
|
+
side?: SelectPrimitive.SelectContentProps["side"];
|
|
1051
1093
|
}
|
|
1052
1094
|
declare const Select: React$1.ForwardRefExoticComponent<ISelectProps & React$1.RefAttributes<never>>;
|
|
1053
1095
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1054
1096
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1055
1097
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
1056
1098
|
isButtonVariant?: boolean;
|
|
1057
|
-
size?: "sm" | "md" | "lg";
|
|
1099
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
1058
1100
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1059
1101
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1060
1102
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1173,11 +1215,12 @@ declare function Skeleton({ className, animate, ...props }: React.HTMLAttributes
|
|
|
1173
1215
|
animate?: boolean;
|
|
1174
1216
|
}): react_jsx_runtime.JSX.Element;
|
|
1175
1217
|
|
|
1176
|
-
type Size =
|
|
1218
|
+
type Size = "sm" | "lg";
|
|
1177
1219
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
1178
1220
|
size?: Size;
|
|
1221
|
+
containerClassName?: ClassNameValue;
|
|
1179
1222
|
} & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1180
|
-
interface ISliderBaseProps extends React$1.RefAttributes<HTMLSpanElement>, Omit<SliderPrimitive.SliderProps,
|
|
1223
|
+
interface ISliderBaseProps extends React$1.RefAttributes<HTMLSpanElement>, Omit<SliderPrimitive.SliderProps, "value" | "defaultValue" | "onValueChange" | "onValueCommit"> {
|
|
1181
1224
|
}
|
|
1182
1225
|
interface ISliderSingleProps extends ISliderBaseProps {
|
|
1183
1226
|
size?: Size;
|
|
@@ -1713,4 +1756,4 @@ declare const LogoIcon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes
|
|
|
1713
1756
|
component?: React$1.ElementType;
|
|
1714
1757
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
1715
1758
|
|
|
1716
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, Checkbox, Chips, CircleErrorIcon, CircleInfoIcon, CircleSuccessIcon, CircleWarningIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, DataEmptyState, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorState, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormRef, Guide, Heading, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, type IconType, Image, type ImageProps, ImgEmptyState, Input, type InputProps, Label, Link, LinkButton, type LinkButtonProps, type LinkProps, LogoIcon, LogoLoading, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultipleSelector, type MultipleSelectorRef, NetworkErrorState, NoPageState, NumberInput, type Option, Paragraph, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchEmptyState, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, State$1 as State, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WalletEmptyState, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDebounce, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|
|
1759
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, Cascader, CascaderContent, type CascaderOption, Checkbox, Chips, CircleErrorIcon, CircleInfoIcon, CircleSuccessIcon, CircleWarningIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, DataEmptyState, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorState, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormRef, Guide, Heading, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, type IconType, Image, type ImageProps, ImgEmptyState, Input, type InputProps, Label, Link, LinkButton, type LinkButtonProps, type LinkProps, LogoIcon, LogoLoading, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultipleSelector, type MultipleSelectorRef, NetworkErrorState, NoPageState, NumberInput, type Option, Paragraph, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchEmptyState, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, State$1 as State, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WalletEmptyState, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDebounce, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { Drawer as Drawer$1 } from 'vaul';
|
|
|
17
17
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
18
18
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
19
19
|
import * as react_hook_form from 'react-hook-form';
|
|
20
|
-
import { FieldValues, FieldPath, ControllerProps
|
|
20
|
+
import { UseFormReturn, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
21
|
+
export { Controller, ControllerProps, FieldPath, FieldValue, FieldValues, FormProvider, Mode, useForm, useFormContext, useWatch } from 'react-hook-form';
|
|
21
22
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
22
23
|
import { DriveStep } from 'driver.js';
|
|
23
24
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -134,7 +135,7 @@ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
|
134
135
|
declare const buttonVariants: (props?: ({
|
|
135
136
|
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "ghost" | "plain" | null | undefined;
|
|
136
137
|
color?: "default" | "brand" | "error" | null | undefined;
|
|
137
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
138
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
138
139
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
139
140
|
type VariantType$1 = 'primary' | 'secondary' | 'tertiary' | 'link' | 'plain' | 'opacity' | 'ghost' | 'static';
|
|
140
141
|
type ButtonBaseProps = VariantProps<typeof buttonVariants>;
|
|
@@ -194,9 +195,46 @@ declare const LinkButton: React$1.ForwardRefExoticComponent<LinkButtonProps & Re
|
|
|
194
195
|
|
|
195
196
|
interface CascaderOption {
|
|
196
197
|
label: string;
|
|
197
|
-
value
|
|
198
|
+
value?: string;
|
|
199
|
+
disabled?: boolean;
|
|
198
200
|
children?: CascaderOption[];
|
|
201
|
+
parent?: string;
|
|
202
|
+
}
|
|
203
|
+
interface CommonP {
|
|
204
|
+
value?: string;
|
|
205
|
+
defaultValue?: string;
|
|
206
|
+
onValueChange: (value: string, parent?: string) => void;
|
|
207
|
+
className?: ClassNameValue;
|
|
199
208
|
}
|
|
209
|
+
interface P extends CommonP {
|
|
210
|
+
options: CascaderOption[];
|
|
211
|
+
disabled?: boolean;
|
|
212
|
+
showParentLabel?: boolean;
|
|
213
|
+
placeholder?: string;
|
|
214
|
+
emptyText?: string;
|
|
215
|
+
clearByDefault?: boolean;
|
|
216
|
+
rounded?: "default" | "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
|
|
217
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
218
|
+
border?: "none" | "default" | null | undefined;
|
|
219
|
+
outline?: "none" | "default" | null | undefined;
|
|
220
|
+
background?: "none" | "default" | null | undefined;
|
|
221
|
+
}
|
|
222
|
+
declare function CascaderContent({ options, value, onValueChange, className, emptyText, buttonRef, }: {
|
|
223
|
+
options: CascaderOption[];
|
|
224
|
+
value?: string;
|
|
225
|
+
onValueChange: (value: string, parent?: string) => void;
|
|
226
|
+
className?: ClassNameValue;
|
|
227
|
+
emptyText?: string;
|
|
228
|
+
buttonRef: React__default.RefObject<HTMLButtonElement>;
|
|
229
|
+
}): react_jsx_runtime.JSX.Element;
|
|
230
|
+
declare function Cascader(props: P): react_jsx_runtime.JSX.Element;
|
|
231
|
+
|
|
232
|
+
declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
233
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
234
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
235
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
236
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
237
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
200
238
|
|
|
201
239
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
202
240
|
variant?: "circle" | "checkbox" | "radio" | "static" | null | undefined;
|
|
@@ -351,7 +389,7 @@ declare const DropdownMenuShortcut: {
|
|
|
351
389
|
type FormRef = UseFormReturn & {
|
|
352
390
|
submit: () => void;
|
|
353
391
|
};
|
|
354
|
-
declare const Form: <
|
|
392
|
+
declare const Form: React$1.ForwardRefExoticComponent<Omit<Omit<any, "ref">, "ref"> & React$1.RefAttributes<UseFormReturn>>;
|
|
355
393
|
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
356
394
|
declare const useFormField: () => {
|
|
357
395
|
invalid: boolean;
|
|
@@ -533,14 +571,14 @@ interface ImageProps {
|
|
|
533
571
|
}
|
|
534
572
|
declare function Image({ className, imgClassName, placeholder, width, height, src, rounded, fallback, object, isBackgroud, preview, fetchPriority, loading, ...otherProps }: ImageProps): react_jsx_runtime.JSX.Element;
|
|
535
573
|
|
|
536
|
-
type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
537
|
-
rounded?:
|
|
538
|
-
size?:
|
|
574
|
+
type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
575
|
+
rounded?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | null | undefined;
|
|
576
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
539
577
|
isFull?: boolean;
|
|
540
|
-
border?:
|
|
541
|
-
shadow?:
|
|
542
|
-
outline?:
|
|
543
|
-
background?:
|
|
578
|
+
border?: "none" | "default" | null | undefined;
|
|
579
|
+
shadow?: "none" | "default" | null | undefined;
|
|
580
|
+
outline?: "none" | "default" | null | undefined;
|
|
581
|
+
background?: "none" | "default" | null | undefined;
|
|
544
582
|
showLength?: boolean;
|
|
545
583
|
rootClassName?: string;
|
|
546
584
|
};
|
|
@@ -600,11 +638,15 @@ interface LinkProps {
|
|
|
600
638
|
* 是否是移动端
|
|
601
639
|
*/
|
|
602
640
|
isMobile?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* 是否需要做移动端路由
|
|
643
|
+
*/
|
|
644
|
+
mobRoute?: boolean;
|
|
603
645
|
onClick?: (e: any) => void;
|
|
604
646
|
children?: React.ReactNode;
|
|
605
647
|
[key: string]: any;
|
|
606
648
|
}
|
|
607
|
-
declare function Link({ className, href, scroll, replace, prefetch, back, children, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
649
|
+
declare function Link({ className, href, scroll, replace, prefetch, back, children, mobRoute, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
608
650
|
|
|
609
651
|
interface BreakpointColsObject {
|
|
610
652
|
default: number;
|
|
@@ -809,9 +851,9 @@ type IMiddleBar = {
|
|
|
809
851
|
};
|
|
810
852
|
declare function MiddleBar({ showSearchBar, searchValue, searchPlaceholder, title, children, energy, dailyEnergy, onSearchChange, }: IMiddleBar): react_jsx_runtime.JSX.Element;
|
|
811
853
|
|
|
812
|
-
type INumberInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
813
|
-
rounded?:
|
|
814
|
-
size?:
|
|
854
|
+
type INumberInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
855
|
+
rounded?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | null | undefined;
|
|
856
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
815
857
|
isFull?: boolean;
|
|
816
858
|
controls?: boolean;
|
|
817
859
|
};
|
|
@@ -1044,17 +1086,17 @@ interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
|
1044
1086
|
placeholder?: React$1.ReactNode;
|
|
1045
1087
|
triggerClassName?: string;
|
|
1046
1088
|
contentClassName?: string;
|
|
1047
|
-
variant?:
|
|
1048
|
-
size?:
|
|
1089
|
+
variant?: "input" | "button";
|
|
1090
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
1049
1091
|
noPortal?: boolean;
|
|
1050
|
-
side?: SelectPrimitive.SelectContentProps[
|
|
1092
|
+
side?: SelectPrimitive.SelectContentProps["side"];
|
|
1051
1093
|
}
|
|
1052
1094
|
declare const Select: React$1.ForwardRefExoticComponent<ISelectProps & React$1.RefAttributes<never>>;
|
|
1053
1095
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1054
1096
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1055
1097
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
1056
1098
|
isButtonVariant?: boolean;
|
|
1057
|
-
size?: "sm" | "md" | "lg";
|
|
1099
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
1058
1100
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1059
1101
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1060
1102
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1173,11 +1215,12 @@ declare function Skeleton({ className, animate, ...props }: React.HTMLAttributes
|
|
|
1173
1215
|
animate?: boolean;
|
|
1174
1216
|
}): react_jsx_runtime.JSX.Element;
|
|
1175
1217
|
|
|
1176
|
-
type Size =
|
|
1218
|
+
type Size = "sm" | "lg";
|
|
1177
1219
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
1178
1220
|
size?: Size;
|
|
1221
|
+
containerClassName?: ClassNameValue;
|
|
1179
1222
|
} & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1180
|
-
interface ISliderBaseProps extends React$1.RefAttributes<HTMLSpanElement>, Omit<SliderPrimitive.SliderProps,
|
|
1223
|
+
interface ISliderBaseProps extends React$1.RefAttributes<HTMLSpanElement>, Omit<SliderPrimitive.SliderProps, "value" | "defaultValue" | "onValueChange" | "onValueCommit"> {
|
|
1181
1224
|
}
|
|
1182
1225
|
interface ISliderSingleProps extends ISliderBaseProps {
|
|
1183
1226
|
size?: Size;
|
|
@@ -1713,4 +1756,4 @@ declare const LogoIcon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes
|
|
|
1713
1756
|
component?: React$1.ElementType;
|
|
1714
1757
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
1715
1758
|
|
|
1716
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, Checkbox, Chips, CircleErrorIcon, CircleInfoIcon, CircleSuccessIcon, CircleWarningIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, DataEmptyState, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorState, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormRef, Guide, Heading, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, type IconType, Image, type ImageProps, ImgEmptyState, Input, type InputProps, Label, Link, LinkButton, type LinkButtonProps, type LinkProps, LogoIcon, LogoLoading, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultipleSelector, type MultipleSelectorRef, NetworkErrorState, NoPageState, NumberInput, type Option, Paragraph, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchEmptyState, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, State$1 as State, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WalletEmptyState, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDebounce, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|
|
1759
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, Cascader, CascaderContent, type CascaderOption, Checkbox, Chips, CircleErrorIcon, CircleInfoIcon, CircleSuccessIcon, CircleWarningIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, DataEmptyState, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorState, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormRef, Guide, Heading, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, type IconType, Image, type ImageProps, ImgEmptyState, Input, type InputProps, Label, Link, LinkButton, type LinkButtonProps, type LinkProps, LogoIcon, LogoLoading, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultipleSelector, type MultipleSelectorRef, NetworkErrorState, NoPageState, NumberInput, type Option, Paragraph, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchEmptyState, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, State$1 as State, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WalletEmptyState, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDebounce, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|