myshell-react-lib 0.1.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/README.md +268 -0
- package/dist/assets/audio-playing.json +3657 -0
- package/dist/index.cjs +9654 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1431 -0
- package/dist/index.d.ts +1431 -0
- package/dist/index.js +8788 -0
- package/dist/index.js.map +1 -0
- package/package.json +140 -0
- package/src/common/assets/audio-playing.json +3657 -0
- package/src/common/constants/constants.ts +24 -0
- package/src/common/constants/types/common.ts +10 -0
- package/src/common/hooks/useAudioPlayer.tsx +198 -0
- package/src/common/hooks/useDevice.ts +26 -0
- package/src/common/hooks/useNativeBridge.ts +42 -0
- package/src/common/hooks/useNotification.tsx +179 -0
- package/src/common/hooks/useWindowWidth.ts +19 -0
- package/src/common/utils/common-helper.ts +81 -0
- package/src/components/ItemDemo.tsx +15 -0
- package/src/components/accordion.tsx +126 -0
- package/src/components/alert-dialog.tsx +148 -0
- package/src/components/alert.tsx +65 -0
- package/src/components/aspect-ratio.tsx +7 -0
- package/src/components/audio-player.tsx +58 -0
- package/src/components/avatar.tsx +133 -0
- package/src/components/badge.tsx +65 -0
- package/src/components/button/button.styles.ts +258 -0
- package/src/components/button/button.tsx +215 -0
- package/src/components/button/icon-button.styles.ts +101 -0
- package/src/components/button/icon-button.tsx +100 -0
- package/src/components/button/index.tsx +3 -0
- package/src/components/button/link-button.tsx +184 -0
- package/src/components/cascader.tsx +175 -0
- package/src/components/checkbox.tsx +135 -0
- package/src/components/command.tsx +155 -0
- package/src/components/context-menu.tsx +198 -0
- package/src/components/count-down.tsx +83 -0
- package/src/components/custom-notification.tsx +95 -0
- package/src/components/dialog.tsx +158 -0
- package/src/components/drawer.tsx +116 -0
- package/src/components/dropdown-menu.tsx +196 -0
- package/src/components/energy-progress.tsx +55 -0
- package/src/components/form.tsx +201 -0
- package/src/components/group.tsx +9 -0
- package/src/components/guide.tsx +243 -0
- package/src/components/icon.tsx +89 -0
- package/src/components/icons/outline/DownIcon.tsx +18 -0
- package/src/components/icons/outline/FilterIcon.tsx +21 -0
- package/src/components/icons/outline/arrow-left.tsx +16 -0
- package/src/components/icons/outline/arrow-up-tray.tsx +16 -0
- package/src/components/icons/outline/check-circle.tsx +17 -0
- package/src/components/icons/outline/config.tsx +42 -0
- package/src/components/icons/outline/pencil-square.tsx +16 -0
- package/src/components/icons/outline/trash.tsx +17 -0
- package/src/components/icons/outline/window.tsx +16 -0
- package/src/components/icons/outline/x-circle.tsx +17 -0
- package/src/components/icons/outline/x-mark.tsx +16 -0
- package/src/components/icons/solid/audio-playing.tsx +31 -0
- package/src/components/icons/solid/caret-down.tsx +14 -0
- package/src/components/icons/solid/code.tsx +18 -0
- package/src/components/icons/solid/drag.tsx +14 -0
- package/src/components/icons/solid/phone.tsx +23 -0
- package/src/components/icons/solid/rectangle-group.tsx +14 -0
- package/src/components/image.tsx +151 -0
- package/src/components/input.tsx +118 -0
- package/src/components/label.tsx +26 -0
- package/src/components/link.tsx +123 -0
- package/src/components/marquee/index.css +15 -0
- package/src/components/marquee/marquee.tsx +220 -0
- package/src/components/masonry.tsx +138 -0
- package/src/components/menubar.tsx +234 -0
- package/src/components/mobile/m-tooltip.tsx +34 -0
- package/src/components/modal.tsx +561 -0
- package/src/components/navigation-bar.tsx +100 -0
- package/src/components/number-input.tsx +143 -0
- package/src/components/page-content.tsx +16 -0
- package/src/components/popover.tsx +191 -0
- package/src/components/progress.tsx +80 -0
- package/src/components/radio-group.tsx +44 -0
- package/src/components/scroll-area.tsx +49 -0
- package/src/components/search-bar.tsx +140 -0
- package/src/components/secondary-navigation-bar.tsx +307 -0
- package/src/components/select.tsx +273 -0
- package/src/components/separator.tsx +31 -0
- package/src/components/sheet.tsx +143 -0
- package/src/components/skeleton.tsx +20 -0
- package/src/components/slider.tsx +160 -0
- package/src/components/spinner.tsx +48 -0
- package/src/components/swiper/index.module.scss +88 -0
- package/src/components/swiper/index.tsx +319 -0
- package/src/components/switch.tsx +67 -0
- package/src/components/tabs.tsx +325 -0
- package/src/components/textarea.tsx +71 -0
- package/src/components/toast/toast.tsx +182 -0
- package/src/components/toast/toaster.tsx +160 -0
- package/src/components/toast/use-toast.tsx +248 -0
- package/src/components/toggle-group.tsx +64 -0
- package/src/components/toggle.tsx +46 -0
- package/src/components/tooltip.tsx +283 -0
- package/src/components/typography.tsx +437 -0
- package/src/index.ts +66 -0
- package/src/lib/utils.ts +62 -0
- package/src/stories/Accordion.stories.tsx +64 -0
- package/src/stories/AccordionItem.stories.tsx +48 -0
- package/src/stories/Avatar.stories.ts +58 -0
- package/src/stories/Badge.stories.tsx +40 -0
- package/src/stories/BannerSwiper.stories.tsx +102 -0
- package/src/stories/Button.stories.tsx +543 -0
- package/src/stories/Checkbox.stories.tsx +161 -0
- package/src/stories/Configure.mdx +341 -0
- package/src/stories/CssProperties.mdx +30 -0
- package/src/stories/Description.stories.ts +70 -0
- package/src/stories/Display.stories.ts +64 -0
- package/src/stories/FeaturedSwiper.stories.tsx +6978 -0
- package/src/stories/GridSwiper.stories.tsx +1407 -0
- package/src/stories/Guide.stories.tsx +247 -0
- package/src/stories/Heading.stories.ts +89 -0
- package/src/stories/Icon.stories.ts +77 -0
- package/src/stories/IconButton.stories.tsx +301 -0
- package/src/stories/IconTextButton.stories.ts +59 -0
- package/src/stories/Image.stories.ts +55 -0
- package/src/stories/Input.stories.tsx +203 -0
- package/src/stories/Modal.stories.tsx +144 -0
- package/src/stories/NavigationBar.stories.tsx +81 -0
- package/src/stories/Notification.stories.tsx +276 -0
- package/src/stories/Popover.stories.tsx +100 -0
- package/src/stories/SearchBar.stories.ts +43 -0
- package/src/stories/SecondaryNavigationBar.stories.tsx +199 -0
- package/src/stories/Select.stories.tsx +107 -0
- package/src/stories/Separator.stories.tsx +49 -0
- package/src/stories/Spinner.stories.tsx +48 -0
- package/src/stories/SubHeading.stories.ts +64 -0
- package/src/stories/Swich.stories.tsx +69 -0
- package/src/stories/Tabs.stories.tsx +90 -0
- package/src/stories/Text.stories.ts +78 -0
- package/src/stories/Textarea.stories.tsx +155 -0
- package/src/stories/Toast.stories.tsx +424 -0
- package/src/stories/Tooltip.stories.tsx +244 -0
- package/src/stories/ViewAutoSwiper.stories.tsx +1408 -0
- package/src/styles/components-dark.scss +212 -0
- package/src/styles/components-light.scss +210 -0
- package/src/styles/design-dark.scss +330 -0
- package/src/styles/design-light.scss +345 -0
- package/src/styles/design2-dark.scss +319 -0
- package/src/styles/design2-light.scss +364 -0
- package/src/styles/font.css +19 -0
- package/src/styles/global.scss +251 -0
- package/src/styles/md-viewer.scss +155 -0
- package/src/styles/new-tokens.scss +255 -0
- package/src/styles/tokens.scss +401 -0
- package/src/types/scss.d.ts +24 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1431 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { ReactElement, SyntheticEvent } from 'react';
|
|
4
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
8
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
9
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
12
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
13
|
+
import * as vaul from 'vaul';
|
|
14
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
15
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
16
|
+
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
17
|
+
import * as react_hook_form from 'react-hook-form';
|
|
18
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
19
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
20
|
+
import { DriveStep } from 'driver.js';
|
|
21
|
+
import { LucideIcon } from 'lucide-react';
|
|
22
|
+
import { ClassNameValue } from 'tailwind-merge';
|
|
23
|
+
import { ImagePreviewType } from 'rc-image';
|
|
24
|
+
import { UrlObject } from 'url';
|
|
25
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
|
26
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
27
|
+
import { FocusScopeProps } from '@radix-ui/react-focus-scope';
|
|
28
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
30
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
31
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
32
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
33
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
34
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
35
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
36
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
37
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
38
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
39
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
40
|
+
|
|
41
|
+
declare const Accordion: React$1.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React$1.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
type AccordionItemProps = React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> & {
|
|
43
|
+
count?: number;
|
|
44
|
+
label?: string;
|
|
45
|
+
headerClassName?: string;
|
|
46
|
+
triggerClassName?: string;
|
|
47
|
+
sticky?: boolean;
|
|
48
|
+
children: React$1.ReactNode;
|
|
49
|
+
};
|
|
50
|
+
declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
51
|
+
count?: number;
|
|
52
|
+
label?: string;
|
|
53
|
+
headerClassName?: string;
|
|
54
|
+
triggerClassName?: string;
|
|
55
|
+
sticky?: boolean;
|
|
56
|
+
children: React$1.ReactNode;
|
|
57
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
59
|
+
count?: number;
|
|
60
|
+
label?: string;
|
|
61
|
+
sticky?: boolean;
|
|
62
|
+
headerClassName?: string;
|
|
63
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
64
|
+
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
|
|
66
|
+
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
67
|
+
variant?: "default" | "error" | "warning" | "destructive" | "info" | null | undefined;
|
|
68
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
70
|
+
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
71
|
+
|
|
72
|
+
declare const AlertDialog: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
73
|
+
declare const AlertDialogPortal: React$1.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
74
|
+
declare const AlertDialogTrigger: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
declare const AlertDialogOverlay: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const AlertDialogContent: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
declare function AlertDialogHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare namespace AlertDialogHeader {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
declare function AlertDialogFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare namespace AlertDialogFooter {
|
|
83
|
+
var displayName: string;
|
|
84
|
+
}
|
|
85
|
+
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
86
|
+
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
87
|
+
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
88
|
+
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
89
|
+
|
|
90
|
+
declare const AspectRatio: React$1.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
91
|
+
|
|
92
|
+
interface IAudioProps {
|
|
93
|
+
src: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const AvatarRoot: React$1.ForwardRefExoticComponent<Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
97
|
+
ref?: ((instance: HTMLSpanElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLSpanElement> | null | undefined;
|
|
98
|
+
} & {
|
|
99
|
+
asChild?: boolean;
|
|
100
|
+
}, "ref"> & VariantProps<(props?: ({
|
|
101
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | null | undefined;
|
|
102
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
103
|
+
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<Omit<React$1.DetailedHTMLProps<React$1.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
104
|
+
ref?: ((instance: HTMLImageElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLImageElement> | null | undefined;
|
|
105
|
+
} & {
|
|
106
|
+
asChild?: boolean;
|
|
107
|
+
}, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
108
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<Omit<React$1.DetailedHTMLProps<React$1.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
109
|
+
ref?: ((instance: HTMLImageElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLImageElement> | null | undefined;
|
|
110
|
+
} & {
|
|
111
|
+
asChild?: boolean;
|
|
112
|
+
}, "ref"> & VariantProps<(props?: ({
|
|
113
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | null | undefined;
|
|
114
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
115
|
+
variant?: "bot" | "user" | "widget";
|
|
116
|
+
border?: boolean;
|
|
117
|
+
rootStyle?: React$1.CSSProperties;
|
|
118
|
+
} & React$1.RefAttributes<HTMLImageElement>>;
|
|
119
|
+
|
|
120
|
+
declare const buttonVariants: (props?: ({
|
|
121
|
+
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "plain" | "solid" | null | undefined;
|
|
122
|
+
color?: "default" | "error" | "brand" | "gray" | "chat" | null | undefined;
|
|
123
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
124
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
125
|
+
|
|
126
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
127
|
+
asChild?: boolean;
|
|
128
|
+
loading?: boolean;
|
|
129
|
+
icon?: React$1.ElementType;
|
|
130
|
+
iconDirection?: 'left' | 'right';
|
|
131
|
+
color?: 'default' | 'brand' | 'error' | 'chat';
|
|
132
|
+
noStyle?: boolean;
|
|
133
|
+
iconClassName?: string;
|
|
134
|
+
iconOutBox?: boolean;
|
|
135
|
+
isBlock?: boolean;
|
|
136
|
+
asset?: 'energy' | 'coin';
|
|
137
|
+
assetNumber?: number;
|
|
138
|
+
}
|
|
139
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
140
|
+
|
|
141
|
+
interface CascaderOption {
|
|
142
|
+
label: string;
|
|
143
|
+
value: string;
|
|
144
|
+
children?: CascaderOption[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
148
|
+
variant?: "circle" | "checkbox" | "radio" | "circle-static" | "circle-inverted" | null | undefined;
|
|
149
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
150
|
+
label?: string;
|
|
151
|
+
caption?: string;
|
|
152
|
+
labelClassName?: string;
|
|
153
|
+
captionClassName?: string;
|
|
154
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
155
|
+
|
|
156
|
+
declare const Command: React$1.ForwardRefExoticComponent<Omit<{
|
|
157
|
+
children?: React$1.ReactNode;
|
|
158
|
+
} & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
159
|
+
label?: string;
|
|
160
|
+
shouldFilter?: boolean;
|
|
161
|
+
filter?: (value: string, search: string) => number;
|
|
162
|
+
defaultValue?: string;
|
|
163
|
+
value?: string;
|
|
164
|
+
onValueChange?: (value: string) => void;
|
|
165
|
+
loop?: boolean;
|
|
166
|
+
vimBindings?: boolean;
|
|
167
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
168
|
+
type CommandDialogProps = DialogProps;
|
|
169
|
+
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => react_jsx_runtime.JSX.Element;
|
|
170
|
+
declare const CommandInput: React$1.ForwardRefExoticComponent<Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "type"> & {
|
|
171
|
+
value?: string;
|
|
172
|
+
onValueChange?: (search: string) => void;
|
|
173
|
+
} & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
174
|
+
declare const CommandList: React$1.ForwardRefExoticComponent<Omit<{
|
|
175
|
+
children?: React$1.ReactNode;
|
|
176
|
+
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
177
|
+
declare const CommandEmpty: React$1.ForwardRefExoticComponent<Omit<{
|
|
178
|
+
children?: React$1.ReactNode;
|
|
179
|
+
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
180
|
+
declare const CommandGroup: React$1.ForwardRefExoticComponent<Omit<{
|
|
181
|
+
children?: React$1.ReactNode;
|
|
182
|
+
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "value" | "heading"> & {
|
|
183
|
+
heading?: React$1.ReactNode;
|
|
184
|
+
value?: string;
|
|
185
|
+
forceMount?: boolean;
|
|
186
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
187
|
+
declare const CommandSeparator: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement> & {
|
|
188
|
+
alwaysRender?: boolean;
|
|
189
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
190
|
+
declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
|
|
191
|
+
children?: React$1.ReactNode;
|
|
192
|
+
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "disabled" | "onSelect" | "value"> & {
|
|
193
|
+
disabled?: boolean;
|
|
194
|
+
onSelect?: (value: string) => void;
|
|
195
|
+
value?: string;
|
|
196
|
+
forceMount?: boolean;
|
|
197
|
+
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
198
|
+
declare const CommandShortcut: {
|
|
199
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
200
|
+
displayName: string;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
declare const ContextMenu: React$1.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
204
|
+
declare const ContextMenuTrigger: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
205
|
+
declare const ContextMenuGroup: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
206
|
+
declare const ContextMenuPortal: React$1.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
207
|
+
declare const ContextMenuSub: React$1.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
208
|
+
declare const ContextMenuRadioGroup: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
209
|
+
declare const ContextMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
210
|
+
inset?: boolean;
|
|
211
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
212
|
+
declare const ContextMenuSubContent: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
213
|
+
declare const ContextMenuContent: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
214
|
+
declare const ContextMenuItem: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
215
|
+
inset?: boolean;
|
|
216
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
217
|
+
declare const ContextMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
218
|
+
declare const ContextMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
219
|
+
declare const ContextMenuLabel: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
220
|
+
inset?: boolean;
|
|
221
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
222
|
+
declare const ContextMenuSeparator: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
223
|
+
declare const ContextMenuShortcut: {
|
|
224
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
225
|
+
displayName: string;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
229
|
+
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
230
|
+
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
231
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
232
|
+
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
233
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
234
|
+
maskClosable?: boolean;
|
|
235
|
+
hideClose?: boolean;
|
|
236
|
+
onClose?: () => void;
|
|
237
|
+
overlayClose?: boolean;
|
|
238
|
+
overlayClassName?: string;
|
|
239
|
+
iconClassName?: string;
|
|
240
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
241
|
+
declare function DialogHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
242
|
+
declare namespace DialogHeader {
|
|
243
|
+
var displayName: string;
|
|
244
|
+
}
|
|
245
|
+
declare function DialogFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
246
|
+
declare namespace DialogFooter {
|
|
247
|
+
var displayName: string;
|
|
248
|
+
}
|
|
249
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
250
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
251
|
+
|
|
252
|
+
declare function Drawer({ shouldScaleBackground, ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
253
|
+
declare namespace Drawer {
|
|
254
|
+
var displayName: string;
|
|
255
|
+
}
|
|
256
|
+
declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
257
|
+
declare const DrawerPortal: typeof vaul.Portal;
|
|
258
|
+
declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
259
|
+
declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
260
|
+
declare const DrawerContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
261
|
+
declare function DrawerHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
262
|
+
declare namespace DrawerHeader {
|
|
263
|
+
var displayName: string;
|
|
264
|
+
}
|
|
265
|
+
declare function DrawerFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
266
|
+
declare namespace DrawerFooter {
|
|
267
|
+
var displayName: string;
|
|
268
|
+
}
|
|
269
|
+
declare const DrawerTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
270
|
+
declare const DrawerDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
271
|
+
|
|
272
|
+
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
273
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
274
|
+
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
275
|
+
declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
276
|
+
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
277
|
+
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
278
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
279
|
+
inset?: boolean;
|
|
280
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
281
|
+
declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
282
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
283
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
284
|
+
inset?: boolean;
|
|
285
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
286
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
287
|
+
declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
288
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
289
|
+
inset?: boolean;
|
|
290
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
291
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
292
|
+
declare const DropdownMenuShortcut: {
|
|
293
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
294
|
+
displayName: string;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
298
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
299
|
+
declare const useFormField: () => {
|
|
300
|
+
invalid: boolean;
|
|
301
|
+
isDirty: boolean;
|
|
302
|
+
isTouched: boolean;
|
|
303
|
+
isValidating: boolean;
|
|
304
|
+
error?: react_hook_form.FieldError;
|
|
305
|
+
id: string;
|
|
306
|
+
name: string;
|
|
307
|
+
formItemId: string;
|
|
308
|
+
formDescriptionId: string;
|
|
309
|
+
formMessageId: string;
|
|
310
|
+
};
|
|
311
|
+
interface IFormItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
312
|
+
layout?: 'Vertical' | 'Horizontal';
|
|
313
|
+
}
|
|
314
|
+
declare const FormItem: React$1.ForwardRefExoticComponent<IFormItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
315
|
+
interface IFormLabelProps extends React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
316
|
+
required?: boolean;
|
|
317
|
+
}
|
|
318
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<IFormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
319
|
+
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
320
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
321
|
+
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
322
|
+
|
|
323
|
+
interface GuideProps {
|
|
324
|
+
steps: DriveStep[];
|
|
325
|
+
showProgress?: boolean;
|
|
326
|
+
showOverlay?: boolean;
|
|
327
|
+
hasCloseBtn?: boolean;
|
|
328
|
+
allowClose?: boolean;
|
|
329
|
+
hasSkip?: boolean;
|
|
330
|
+
skipText?: string;
|
|
331
|
+
hasNextBtn?: boolean;
|
|
332
|
+
hasPrevBtn?: boolean;
|
|
333
|
+
prevBtnText?: string;
|
|
334
|
+
nextBtnText?: string;
|
|
335
|
+
doneBtnText?: string;
|
|
336
|
+
className?: string;
|
|
337
|
+
onComplete?: () => void;
|
|
338
|
+
onSkip?: () => void;
|
|
339
|
+
}
|
|
340
|
+
declare const Guide: React$1.FC<GuideProps>;
|
|
341
|
+
|
|
342
|
+
declare const iconVariants: (props?: ({
|
|
343
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | null | undefined;
|
|
344
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "bolder" | "inverse" | null | undefined;
|
|
345
|
+
rotate?: "45" | "90" | "-45" | "-90" | "180" | null | undefined;
|
|
346
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
347
|
+
type IconProps = React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof iconVariants> & {
|
|
348
|
+
/**
|
|
349
|
+
* icon 组件 优先heroicons
|
|
350
|
+
*/
|
|
351
|
+
component?: React$1.ElementType;
|
|
352
|
+
};
|
|
353
|
+
declare const Icon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
354
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | null | undefined;
|
|
355
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "bolder" | "inverse" | null | undefined;
|
|
356
|
+
rotate?: "45" | "90" | "-45" | "-90" | "180" | null | undefined;
|
|
357
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
358
|
+
/**
|
|
359
|
+
* icon 组件 优先heroicons
|
|
360
|
+
*/
|
|
361
|
+
component?: React$1.ElementType;
|
|
362
|
+
} & React$1.RefAttributes<HTMLSpanElement>>;
|
|
363
|
+
type IconComponent = React$1.ForwardRefExoticComponent<IconProps>;
|
|
364
|
+
|
|
365
|
+
declare const iconButtonVariants: (props?: ({
|
|
366
|
+
variant?: "opacity" | "primary" | "secondary" | "tertiary" | "plain" | "solid" | null | undefined;
|
|
367
|
+
color?: "default" | "error" | "brand" | "gray" | null | undefined;
|
|
368
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
369
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
370
|
+
type IconButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
371
|
+
|
|
372
|
+
type HeroIcon$1 = React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<React$1.SVGProps<SVGSVGElement>> & {
|
|
373
|
+
title?: string;
|
|
374
|
+
titleId?: string;
|
|
375
|
+
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
376
|
+
interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
377
|
+
asChild?: boolean;
|
|
378
|
+
loading?: boolean;
|
|
379
|
+
disabled?: boolean;
|
|
380
|
+
color?: 'default' | 'brand' | 'error' | 'gray';
|
|
381
|
+
icon?: HeroIcon$1 | LucideIcon | IconComponent | React$1.ElementType;
|
|
382
|
+
hoverText?: string;
|
|
383
|
+
hoverSide?: 'top' | 'right' | 'bottom' | 'left';
|
|
384
|
+
iconClassName?: ClassNameValue;
|
|
385
|
+
size?: IconButtonSize;
|
|
386
|
+
}
|
|
387
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
388
|
+
|
|
389
|
+
interface ImageProps {
|
|
390
|
+
/**
|
|
391
|
+
* 图片地址
|
|
392
|
+
*/
|
|
393
|
+
src: string;
|
|
394
|
+
/**
|
|
395
|
+
* 图像宽度
|
|
396
|
+
* string | number
|
|
397
|
+
*/
|
|
398
|
+
width?: string | number;
|
|
399
|
+
/**
|
|
400
|
+
* 图像高度
|
|
401
|
+
* string | number
|
|
402
|
+
*/
|
|
403
|
+
height?: string | number;
|
|
404
|
+
/**
|
|
405
|
+
* 加载占位,为 true 时使用默认占位
|
|
406
|
+
*/
|
|
407
|
+
placeholder?: boolean | ReactElement;
|
|
408
|
+
/**
|
|
409
|
+
* 加载失败容错地址
|
|
410
|
+
*/
|
|
411
|
+
fallback?: string;
|
|
412
|
+
/**
|
|
413
|
+
* 预览参数,为 false 时禁用
|
|
414
|
+
*/
|
|
415
|
+
/**
|
|
416
|
+
* 圆角,默认为 none
|
|
417
|
+
*/
|
|
418
|
+
rounded?: 'none' | 'sm' | 'default' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
419
|
+
/**
|
|
420
|
+
* 填充类型
|
|
421
|
+
*/
|
|
422
|
+
object?: 'contain' | 'cover' | 'fill' | 'none';
|
|
423
|
+
/**
|
|
424
|
+
* 图像描述
|
|
425
|
+
*/
|
|
426
|
+
alt?: string;
|
|
427
|
+
/**
|
|
428
|
+
* image样式覆盖
|
|
429
|
+
*/
|
|
430
|
+
className?: string;
|
|
431
|
+
/**
|
|
432
|
+
* image样式覆盖
|
|
433
|
+
*/
|
|
434
|
+
imgClassName?: string;
|
|
435
|
+
/**
|
|
436
|
+
* 是否是背景图
|
|
437
|
+
*/
|
|
438
|
+
isBackgroud?: boolean;
|
|
439
|
+
preview?: boolean | ImagePreviewType;
|
|
440
|
+
/**
|
|
441
|
+
* 加载优先级
|
|
442
|
+
*
|
|
443
|
+
* @default auto
|
|
444
|
+
*/
|
|
445
|
+
fetchPriority?: 'auto' | 'high' | 'low' | 'low';
|
|
446
|
+
loading?: 'eager' | 'lazy';
|
|
447
|
+
style?: React.CSSProperties;
|
|
448
|
+
/**
|
|
449
|
+
* 加载错误回调
|
|
450
|
+
*/
|
|
451
|
+
onError?: (event: SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
452
|
+
}
|
|
453
|
+
declare function Image({ className, imgClassName, placeholder, width, height, src, rounded, fallback, object, isBackgroud, preview, fetchPriority, loading, ...otherProps }: ImageProps): react_jsx_runtime.JSX.Element;
|
|
454
|
+
|
|
455
|
+
type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
|
|
456
|
+
rounded?: 'default' | 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' | null | undefined;
|
|
457
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | null | undefined;
|
|
458
|
+
isFull?: boolean;
|
|
459
|
+
border?: 'none' | 'default' | null | undefined;
|
|
460
|
+
shadow?: 'none' | 'default' | null | undefined;
|
|
461
|
+
outline?: 'none' | 'default' | null | undefined;
|
|
462
|
+
background?: 'none' | 'default' | null | undefined;
|
|
463
|
+
};
|
|
464
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
465
|
+
rounded?: "default" | "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
|
|
466
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
467
|
+
isFull?: boolean;
|
|
468
|
+
border?: "none" | "default" | null | undefined;
|
|
469
|
+
shadow?: "none" | "default" | null | undefined;
|
|
470
|
+
outline?: "none" | "default" | null | undefined;
|
|
471
|
+
background?: "none" | "default" | null | undefined;
|
|
472
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
473
|
+
|
|
474
|
+
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
475
|
+
|
|
476
|
+
interface LinkProps {
|
|
477
|
+
/**
|
|
478
|
+
* 跳转地址
|
|
479
|
+
* '/about'
|
|
480
|
+
* {
|
|
481
|
+
* pathname: '/about',
|
|
482
|
+
query: { name: 'test' },
|
|
483
|
+
* }
|
|
484
|
+
*/
|
|
485
|
+
href: string | UrlObject;
|
|
486
|
+
/**
|
|
487
|
+
* 图像宽度
|
|
488
|
+
* string | number
|
|
489
|
+
*/
|
|
490
|
+
scroll?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* 替换url
|
|
493
|
+
*/
|
|
494
|
+
replace?: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* true:进入视区预先获取herf数据
|
|
497
|
+
* false:进入视区不获取,悬浮时获取
|
|
498
|
+
*/
|
|
499
|
+
prefetch?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Forces `Link` to send the `href` property to its child.
|
|
502
|
+
*
|
|
503
|
+
* @defaultValue `false`
|
|
504
|
+
*/
|
|
505
|
+
passHref?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* 样式覆盖
|
|
508
|
+
*/
|
|
509
|
+
className?: string;
|
|
510
|
+
/**
|
|
511
|
+
* 是否是返回link
|
|
512
|
+
*/
|
|
513
|
+
back?: boolean;
|
|
514
|
+
onClick?: (e: any) => void;
|
|
515
|
+
children?: React.ReactNode;
|
|
516
|
+
[key: string]: any;
|
|
517
|
+
}
|
|
518
|
+
declare function Link({ className, href, scroll, replace, prefetch, back, children, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
519
|
+
|
|
520
|
+
declare const MenubarMenu: {
|
|
521
|
+
(props: MenubarPrimitive.MenubarMenuProps & {
|
|
522
|
+
__scopeMenubar?: _radix_ui_react_context.Scope;
|
|
523
|
+
}): react_jsx_runtime.JSX.Element;
|
|
524
|
+
displayName: string;
|
|
525
|
+
};
|
|
526
|
+
declare const MenubarGroup: React$1.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
527
|
+
declare const MenubarPortal: React$1.FC<MenubarPrimitive.MenubarPortalProps>;
|
|
528
|
+
declare const MenubarSub: React$1.FC<MenubarPrimitive.MenubarSubProps>;
|
|
529
|
+
declare const MenubarRadioGroup: React$1.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
530
|
+
declare const Menubar: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
531
|
+
declare const MenubarTrigger: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
532
|
+
declare const MenubarSubTrigger: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
533
|
+
inset?: boolean;
|
|
534
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
535
|
+
declare const MenubarSubContent: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
536
|
+
declare const MenubarContent: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
537
|
+
declare const MenubarItem: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
538
|
+
inset?: boolean;
|
|
539
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
540
|
+
declare const MenubarCheckboxItem: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
541
|
+
declare const MenubarRadioItem: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
542
|
+
declare const MenubarLabel: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
543
|
+
inset?: boolean;
|
|
544
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
545
|
+
declare const MenubarSeparator: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
546
|
+
declare const MenubarShortcut: {
|
|
547
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
548
|
+
displayname: string;
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
declare const ModalOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
552
|
+
declare const ModalContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
553
|
+
declare const ModalRoot: React$1.FC<React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Dialog>>;
|
|
554
|
+
declare const ModalTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
555
|
+
declare const modalVariants: (props?: ({
|
|
556
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
557
|
+
zIndex?: 99 | 9 | 999 | 9999 | null | undefined;
|
|
558
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
559
|
+
type TModalState = 'info' | 'success' | 'warning' | 'error';
|
|
560
|
+
declare const Modal: React$1.FC<React$1.ComponentPropsWithoutRef<typeof ModalRoot> & {
|
|
561
|
+
/**
|
|
562
|
+
* 模态框标题文本
|
|
563
|
+
*/
|
|
564
|
+
title?: string;
|
|
565
|
+
/**
|
|
566
|
+
* 模态框描述文本
|
|
567
|
+
*/
|
|
568
|
+
description?: string;
|
|
569
|
+
/**
|
|
570
|
+
* 点击覆盖层是否关闭模态框
|
|
571
|
+
*/
|
|
572
|
+
overlayClose?: boolean;
|
|
573
|
+
/**
|
|
574
|
+
* 是否隐藏关闭按钮
|
|
575
|
+
*/
|
|
576
|
+
hideClose?: boolean;
|
|
577
|
+
/**
|
|
578
|
+
* 模态框是否仅作为模态框显示(而不是抽屉)
|
|
579
|
+
*/
|
|
580
|
+
modalOnly?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* 覆盖层的额外类名
|
|
583
|
+
*/
|
|
584
|
+
overlayClassName?: string;
|
|
585
|
+
/**
|
|
586
|
+
* 模态框内容的额外类名
|
|
587
|
+
*/
|
|
588
|
+
contentClassName?: string;
|
|
589
|
+
/**
|
|
590
|
+
* 关闭按钮的额外类名
|
|
591
|
+
*/
|
|
592
|
+
closeClassName?: string;
|
|
593
|
+
/**
|
|
594
|
+
* 图标的额外类名
|
|
595
|
+
*/
|
|
596
|
+
iconClassName?: string;
|
|
597
|
+
/**
|
|
598
|
+
* 模态框是否以全屏显示
|
|
599
|
+
*/
|
|
600
|
+
fullScreen?: boolean;
|
|
601
|
+
/**
|
|
602
|
+
* 焦点范围管理的选项
|
|
603
|
+
*/
|
|
604
|
+
focusScopeOptions?: FocusScopeProps;
|
|
605
|
+
/**
|
|
606
|
+
* 登录模态框的特殊逻辑
|
|
607
|
+
*/
|
|
608
|
+
isLogin?: boolean;
|
|
609
|
+
/**
|
|
610
|
+
* 表示模态框是否为通知
|
|
611
|
+
*/
|
|
612
|
+
isNotification?: boolean;
|
|
613
|
+
/**
|
|
614
|
+
* 模态框的状态(信息、成功、警告、错误)
|
|
615
|
+
*/
|
|
616
|
+
state?: TModalState;
|
|
617
|
+
/**
|
|
618
|
+
* isNotification 的情况下可能会需要
|
|
619
|
+
*/
|
|
620
|
+
showCancel?: boolean;
|
|
621
|
+
/**
|
|
622
|
+
* 是否为水平布局
|
|
623
|
+
*/
|
|
624
|
+
isHorizontal?: boolean;
|
|
625
|
+
/**
|
|
626
|
+
* 确认按钮的加载状态
|
|
627
|
+
*/
|
|
628
|
+
confirmLoading?: boolean;
|
|
629
|
+
/**
|
|
630
|
+
* 取消按钮的文本
|
|
631
|
+
*/
|
|
632
|
+
cancelText?: string;
|
|
633
|
+
/**
|
|
634
|
+
* 确认按钮的文本
|
|
635
|
+
*/
|
|
636
|
+
confirmText?: string;
|
|
637
|
+
/**
|
|
638
|
+
* 是否自动聚焦
|
|
639
|
+
* @default false
|
|
640
|
+
*/
|
|
641
|
+
autoFocus?: string;
|
|
642
|
+
/**
|
|
643
|
+
* 关闭模态框时的回调函数
|
|
644
|
+
*/
|
|
645
|
+
onClose?: () => void;
|
|
646
|
+
/**
|
|
647
|
+
* 确认操作时的回调函数
|
|
648
|
+
*/
|
|
649
|
+
onConfirm?: () => void;
|
|
650
|
+
} & VariantProps<typeof modalVariants>>;
|
|
651
|
+
declare function ModalHeader({ className, children, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
652
|
+
declare namespace ModalHeader {
|
|
653
|
+
var displayName: string;
|
|
654
|
+
}
|
|
655
|
+
declare function ModalFooter({ className, children, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
656
|
+
declare namespace ModalFooter {
|
|
657
|
+
var displayName: string;
|
|
658
|
+
}
|
|
659
|
+
declare function ModalBody({ className, children, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
660
|
+
declare namespace ModalBody {
|
|
661
|
+
var displayName: string;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
type INavigationBar = {
|
|
665
|
+
/**
|
|
666
|
+
* 右侧自定义内容
|
|
667
|
+
* ReactNode
|
|
668
|
+
*
|
|
669
|
+
*/
|
|
670
|
+
children?: React.ReactNode;
|
|
671
|
+
/**
|
|
672
|
+
* 导航栏title
|
|
673
|
+
* string
|
|
674
|
+
*/
|
|
675
|
+
title?: string;
|
|
676
|
+
/**
|
|
677
|
+
* 是否展示搜索框
|
|
678
|
+
* boolean
|
|
679
|
+
*
|
|
680
|
+
* @default false
|
|
681
|
+
*/
|
|
682
|
+
showSearchBar?: boolean;
|
|
683
|
+
/**
|
|
684
|
+
* 搜索框值
|
|
685
|
+
* string
|
|
686
|
+
*/
|
|
687
|
+
searchValue?: string;
|
|
688
|
+
/**
|
|
689
|
+
* 搜索框占位值
|
|
690
|
+
* string
|
|
691
|
+
*/
|
|
692
|
+
searchPlaceholder?: string;
|
|
693
|
+
/**
|
|
694
|
+
* 电量值
|
|
695
|
+
* number
|
|
696
|
+
*/
|
|
697
|
+
energy?: number;
|
|
698
|
+
/**
|
|
699
|
+
* 每日电量值
|
|
700
|
+
* number
|
|
701
|
+
*/
|
|
702
|
+
dailyEnergy?: number;
|
|
703
|
+
onSearchChange?: (value: string) => void;
|
|
704
|
+
};
|
|
705
|
+
declare function NavigationBar({ showSearchBar, searchValue, searchPlaceholder, title, children, energy, dailyEnergy, onSearchChange, }: INavigationBar): react_jsx_runtime.JSX.Element;
|
|
706
|
+
|
|
707
|
+
type INumberInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
|
|
708
|
+
rounded?: 'default' | 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' | null | undefined;
|
|
709
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | null | undefined;
|
|
710
|
+
isFull?: boolean;
|
|
711
|
+
controls?: boolean;
|
|
712
|
+
};
|
|
713
|
+
declare const NumberInput: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
714
|
+
rounded?: "default" | "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
|
|
715
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
716
|
+
isFull?: boolean;
|
|
717
|
+
controls?: boolean;
|
|
718
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
719
|
+
|
|
720
|
+
declare const PopoverRoot: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
721
|
+
declare const PopoverAnchor: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
722
|
+
interface PopoverContentExs {
|
|
723
|
+
/**
|
|
724
|
+
* 是否展示箭头
|
|
725
|
+
*/
|
|
726
|
+
showArrow?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* 消息类型
|
|
729
|
+
*/
|
|
730
|
+
variant?: 'default' | 'info' | 'message';
|
|
731
|
+
/**
|
|
732
|
+
* 气泡方向
|
|
733
|
+
*/
|
|
734
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
735
|
+
/**
|
|
736
|
+
* 气泡箭头位置
|
|
737
|
+
*/
|
|
738
|
+
align?: 'start' | 'center' | 'end';
|
|
739
|
+
modal?: boolean;
|
|
740
|
+
container?: HTMLElement | null;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* PopoverContent
|
|
744
|
+
*/
|
|
745
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & PopoverContentExs & React$1.RefAttributes<HTMLDivElement>>;
|
|
746
|
+
declare const Popover: ({ disabled, open, title, content, anchor, children, className, triggerClassName, hasOpenState, isMTooltip, modal, openChangeCallback, ...props }: Omit<React$1.ComponentProps<typeof PopoverPrimitive.Content>, "content"> & PopoverContentExs & {
|
|
747
|
+
open?: boolean;
|
|
748
|
+
disabled?: boolean;
|
|
749
|
+
triggerClassName?: string;
|
|
750
|
+
title?: string;
|
|
751
|
+
content?: string | React$1.ReactNode;
|
|
752
|
+
anchor?: React$1.ReactNode;
|
|
753
|
+
hasOpenState?: boolean;
|
|
754
|
+
isMTooltip?: boolean;
|
|
755
|
+
openChangeCallback?: (open: boolean) => void;
|
|
756
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
757
|
+
|
|
758
|
+
type ProgressProps = {
|
|
759
|
+
/**
|
|
760
|
+
* 进度条的当前值
|
|
761
|
+
*/
|
|
762
|
+
value: number;
|
|
763
|
+
/**
|
|
764
|
+
* 进度条的最大值
|
|
765
|
+
*/
|
|
766
|
+
max: number;
|
|
767
|
+
/**
|
|
768
|
+
* 进度条的自定义类名
|
|
769
|
+
*/
|
|
770
|
+
className?: string;
|
|
771
|
+
/**
|
|
772
|
+
* 进度条指示器的自定义类名
|
|
773
|
+
*/
|
|
774
|
+
indicatorClassName?: string;
|
|
775
|
+
/**
|
|
776
|
+
* 进度条的标签内容
|
|
777
|
+
*/
|
|
778
|
+
label?: React.ReactNode;
|
|
779
|
+
/**
|
|
780
|
+
* 进度条的高度
|
|
781
|
+
*/
|
|
782
|
+
height?: number;
|
|
783
|
+
/**
|
|
784
|
+
* 进度条的宽度
|
|
785
|
+
*/
|
|
786
|
+
width?: number;
|
|
787
|
+
/**
|
|
788
|
+
* 进度条最小宽度
|
|
789
|
+
*/
|
|
790
|
+
minWidth?: number;
|
|
791
|
+
/**
|
|
792
|
+
* 进度条最大宽度
|
|
793
|
+
*/
|
|
794
|
+
maxWidth?: number;
|
|
795
|
+
};
|
|
796
|
+
declare const Progress: ({ value, max, className, indicatorClassName, label, height, width, minWidth, maxWidth, }: ProgressProps) => react_jsx_runtime.JSX.Element;
|
|
797
|
+
|
|
798
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
799
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
800
|
+
|
|
801
|
+
declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
802
|
+
declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
803
|
+
|
|
804
|
+
type SearchInputProps = React$1.InputHTMLAttributes<HTMLInputElement>;
|
|
805
|
+
type SearchBarProps = {
|
|
806
|
+
/**
|
|
807
|
+
* searchBar样式覆盖
|
|
808
|
+
*/
|
|
809
|
+
className?: string;
|
|
810
|
+
/**
|
|
811
|
+
* input样式覆盖
|
|
812
|
+
*/
|
|
813
|
+
inputClassName?: string;
|
|
814
|
+
searchValue?: string;
|
|
815
|
+
/**
|
|
816
|
+
* 点击或键盘按下回车时触发回调函数
|
|
817
|
+
*/
|
|
818
|
+
onSearchChange: (value: string) => void;
|
|
819
|
+
/**
|
|
820
|
+
* placeholder值
|
|
821
|
+
*/
|
|
822
|
+
placeholder?: string;
|
|
823
|
+
/**
|
|
824
|
+
* 大小 sm(default) | md
|
|
825
|
+
*
|
|
826
|
+
* @default sm
|
|
827
|
+
*/
|
|
828
|
+
size?: 'md' | 'sm' | 'xs';
|
|
829
|
+
/**
|
|
830
|
+
* 是否圆角
|
|
831
|
+
*/
|
|
832
|
+
roundedFill?: boolean;
|
|
833
|
+
/**
|
|
834
|
+
* 值改变时触发回调函数
|
|
835
|
+
*/
|
|
836
|
+
onValueChange?: (value: string) => void;
|
|
837
|
+
} & Omit<SearchInputProps, 'size'>;
|
|
838
|
+
declare function SearchBar({ className, inputClassName, placeholder, type, size, readOnly, searchValue, roundedFill, onSearchChange, onValueChange, ...props }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
839
|
+
declare namespace SearchBar {
|
|
840
|
+
var displayName: string;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* 通用类型定义
|
|
845
|
+
*/
|
|
846
|
+
type HeroIcon = React.ForwardRefExoticComponent<React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> & {
|
|
847
|
+
title?: string;
|
|
848
|
+
titleId?: string;
|
|
849
|
+
} & React.RefAttributes<SVGSVGElement>>;
|
|
850
|
+
|
|
851
|
+
type IIcons = {
|
|
852
|
+
icon: HeroIcon | LucideIcon | IconComponent | React.ElementType;
|
|
853
|
+
onClick?: () => void;
|
|
854
|
+
};
|
|
855
|
+
type IActions = {
|
|
856
|
+
label: string;
|
|
857
|
+
onClick?: () => void;
|
|
858
|
+
icon?: HeroIcon | LucideIcon | IconComponent | React.ElementType;
|
|
859
|
+
variant?: 'primary' | 'secondary' | 'static' | 'link' | 'plain';
|
|
860
|
+
color?: 'default' | 'brand' | 'error' | 'chat';
|
|
861
|
+
};
|
|
862
|
+
type ISecondaryNavigationBar = {
|
|
863
|
+
/**
|
|
864
|
+
* 是否展示背景
|
|
865
|
+
* boolean
|
|
866
|
+
*
|
|
867
|
+
* @default true
|
|
868
|
+
*/
|
|
869
|
+
hasBackground?: boolean;
|
|
870
|
+
/**
|
|
871
|
+
* 右侧自定义内容
|
|
872
|
+
* ReactNode
|
|
873
|
+
*
|
|
874
|
+
*/
|
|
875
|
+
children?: React.ReactNode;
|
|
876
|
+
/**
|
|
877
|
+
* 导航栏title
|
|
878
|
+
* string
|
|
879
|
+
*/
|
|
880
|
+
title?: string;
|
|
881
|
+
/**
|
|
882
|
+
* 是否展示搜索框
|
|
883
|
+
* boolean
|
|
884
|
+
*
|
|
885
|
+
* @default false
|
|
886
|
+
*/
|
|
887
|
+
showSearchBar?: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* 搜索框值
|
|
890
|
+
* string
|
|
891
|
+
*/
|
|
892
|
+
searchValue?: string;
|
|
893
|
+
/**
|
|
894
|
+
* 搜索框占位值
|
|
895
|
+
* string
|
|
896
|
+
*/
|
|
897
|
+
searchPlaceholder?: string;
|
|
898
|
+
/**
|
|
899
|
+
* 是否显示底部border
|
|
900
|
+
* boolean
|
|
901
|
+
*/
|
|
902
|
+
border?: boolean;
|
|
903
|
+
/**
|
|
904
|
+
* 返回链接,有配置则显示返回icon
|
|
905
|
+
* string
|
|
906
|
+
*/
|
|
907
|
+
backUrl?: string;
|
|
908
|
+
/**
|
|
909
|
+
* 是否展示清除按钮
|
|
910
|
+
* boolean
|
|
911
|
+
*
|
|
912
|
+
* @default false
|
|
913
|
+
*/
|
|
914
|
+
showClear?: boolean;
|
|
915
|
+
/**
|
|
916
|
+
* 清除按钮文本
|
|
917
|
+
* string
|
|
918
|
+
*/
|
|
919
|
+
clearText?: string;
|
|
920
|
+
/**
|
|
921
|
+
* icon按钮配置
|
|
922
|
+
* IIcons
|
|
923
|
+
*/
|
|
924
|
+
icons?: IIcons[];
|
|
925
|
+
/**
|
|
926
|
+
* 操作按钮配置
|
|
927
|
+
* IActions
|
|
928
|
+
*/
|
|
929
|
+
actions?: IActions[];
|
|
930
|
+
/**
|
|
931
|
+
* 头像配置
|
|
932
|
+
* {
|
|
933
|
+
* logo: string;
|
|
934
|
+
* name?: string;
|
|
935
|
+
* }
|
|
936
|
+
*/
|
|
937
|
+
avatar?: {
|
|
938
|
+
logo: string;
|
|
939
|
+
name?: string;
|
|
940
|
+
};
|
|
941
|
+
onSearchChange?: (value: string) => void;
|
|
942
|
+
onClear?: () => void;
|
|
943
|
+
};
|
|
944
|
+
declare function SecondaryNavigationBar({ showSearchBar, searchValue, searchPlaceholder, title, border, backUrl, showClear, clearText, icons, actions, children, hasBackground, avatar, onSearchChange, onClear, }: ISecondaryNavigationBar): react_jsx_runtime.JSX.Element;
|
|
945
|
+
|
|
946
|
+
interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
947
|
+
options?: Array<{
|
|
948
|
+
value: string;
|
|
949
|
+
label: string;
|
|
950
|
+
icon?: React$1.ReactNode | React$1.ElementType | string;
|
|
951
|
+
disabled?: boolean;
|
|
952
|
+
critical?: boolean;
|
|
953
|
+
}>;
|
|
954
|
+
placeholder?: React$1.ReactNode;
|
|
955
|
+
triggerClassName?: string;
|
|
956
|
+
}
|
|
957
|
+
declare const Select: React$1.ForwardRefExoticComponent<ISelectProps & React$1.RefAttributes<never>>;
|
|
958
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
959
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
960
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
961
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
962
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
963
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
964
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
965
|
+
interface ISelectIconProps {
|
|
966
|
+
icon?: React$1.ReactNode | React$1.ElementType | string;
|
|
967
|
+
critical?: boolean;
|
|
968
|
+
}
|
|
969
|
+
declare function SelectIcon(props: ISelectIconProps): react_jsx_runtime.JSX.Element | null;
|
|
970
|
+
declare namespace SelectIcon {
|
|
971
|
+
var displayName: string | undefined;
|
|
972
|
+
}
|
|
973
|
+
interface ISelectItemProps extends SelectPrimitive.SelectItemProps, ISelectIconProps {
|
|
974
|
+
}
|
|
975
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<ISelectItemProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
976
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
977
|
+
|
|
978
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
979
|
+
|
|
980
|
+
declare const Sheet: React$1.FC<DialogPrimitive.DialogProps>;
|
|
981
|
+
declare const SheetTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
982
|
+
declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
983
|
+
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
984
|
+
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
985
|
+
declare const sheetVariants: (props?: ({
|
|
986
|
+
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
987
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
988
|
+
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
989
|
+
}
|
|
990
|
+
declare const SheetContent: React$1.ForwardRefExoticComponent<SheetContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
991
|
+
declare const SheetHeader: {
|
|
992
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
993
|
+
displayName: string;
|
|
994
|
+
};
|
|
995
|
+
declare const SheetFooter: {
|
|
996
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
997
|
+
displayName: string;
|
|
998
|
+
};
|
|
999
|
+
declare const SheetTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1000
|
+
declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1001
|
+
|
|
1002
|
+
declare function Skeleton({ className, animate, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
1003
|
+
animate?: boolean;
|
|
1004
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1005
|
+
|
|
1006
|
+
type Size = 'sm' | 'lg';
|
|
1007
|
+
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
1008
|
+
size?: Size;
|
|
1009
|
+
} & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1010
|
+
interface ISliderBaseProps extends React$1.RefAttributes<HTMLSpanElement>, Omit<SliderPrimitive.SliderProps, 'value' | 'defaultValue' | 'onValueChange' | 'onValueCommit'> {
|
|
1011
|
+
}
|
|
1012
|
+
interface ISliderSingleProps extends ISliderBaseProps {
|
|
1013
|
+
size?: Size;
|
|
1014
|
+
value?: number;
|
|
1015
|
+
defaultValue?: number;
|
|
1016
|
+
onValueChange?: (value: number) => void;
|
|
1017
|
+
onValueCommit?: (value: number) => void;
|
|
1018
|
+
settable?: boolean;
|
|
1019
|
+
containerClassName?: ClassNameValue;
|
|
1020
|
+
trackClassName?: ClassNameValue;
|
|
1021
|
+
rangeClassName?: ClassNameValue;
|
|
1022
|
+
thumbClassName?: ClassNameValue;
|
|
1023
|
+
}
|
|
1024
|
+
declare const SliderSingle: React$1.ForwardRefExoticComponent<Omit<ISliderSingleProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1025
|
+
|
|
1026
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
1027
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1028
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
1029
|
+
label?: string;
|
|
1030
|
+
labelClassName?: string;
|
|
1031
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1032
|
+
|
|
1033
|
+
type TItems = {
|
|
1034
|
+
label?: string;
|
|
1035
|
+
value: string;
|
|
1036
|
+
count?: number | string;
|
|
1037
|
+
tooltip?: {
|
|
1038
|
+
description?: string;
|
|
1039
|
+
open?: boolean;
|
|
1040
|
+
variant?: 'default' | 'info' | 'message';
|
|
1041
|
+
};
|
|
1042
|
+
icon?: React$1.ElementType;
|
|
1043
|
+
disabled?: boolean;
|
|
1044
|
+
link?: string;
|
|
1045
|
+
hasUnRead?: boolean;
|
|
1046
|
+
children?: string | React$1.ReactNode;
|
|
1047
|
+
className?: string;
|
|
1048
|
+
onClickCallback?: (value: string) => void;
|
|
1049
|
+
};
|
|
1050
|
+
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1051
|
+
variant?: "button" | "underline" | "icon";
|
|
1052
|
+
size?: "sm" | "md" | "lg";
|
|
1053
|
+
rounded?: "default" | "full";
|
|
1054
|
+
/**
|
|
1055
|
+
* 是否为链接
|
|
1056
|
+
*/
|
|
1057
|
+
isLink?: boolean;
|
|
1058
|
+
listClassName?: string;
|
|
1059
|
+
items?: TItems[];
|
|
1060
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1061
|
+
declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
1062
|
+
variant?: "button" | "underline" | "icon";
|
|
1063
|
+
size?: "sm" | "md" | "lg";
|
|
1064
|
+
rounded?: "default" | "full";
|
|
1065
|
+
isLink?: boolean;
|
|
1066
|
+
link?: string;
|
|
1067
|
+
count?: number | string;
|
|
1068
|
+
label?: string;
|
|
1069
|
+
icon?: React$1.ElementType;
|
|
1070
|
+
tooltip?: {
|
|
1071
|
+
description?: string;
|
|
1072
|
+
open?: boolean;
|
|
1073
|
+
variant?: "default" | "info" | "message";
|
|
1074
|
+
};
|
|
1075
|
+
hasUnRead?: boolean;
|
|
1076
|
+
onClickCallback?: (value: string) => void;
|
|
1077
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1078
|
+
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1079
|
+
|
|
1080
|
+
type TextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
1081
|
+
maxLengthClassName?: string;
|
|
1082
|
+
};
|
|
1083
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
1084
|
+
maxLengthClassName?: string;
|
|
1085
|
+
} & {
|
|
1086
|
+
error?: string;
|
|
1087
|
+
} & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
1088
|
+
|
|
1089
|
+
declare const toggleVariants: (props?: ({
|
|
1090
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1091
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
1092
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1093
|
+
declare const Toggle: React$1.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
1094
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1095
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
1096
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1097
|
+
|
|
1098
|
+
declare const ToggleGroup: React$1.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React$1.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
1099
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1100
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
1101
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string>) & React$1.RefAttributes<HTMLDivElement>>;
|
|
1102
|
+
declare const ToggleGroupItem: React$1.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
1103
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1104
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
1105
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1106
|
+
|
|
1107
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
1108
|
+
declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipProps & {
|
|
1109
|
+
/**
|
|
1110
|
+
* 文案大小
|
|
1111
|
+
*/
|
|
1112
|
+
size?: "sm" | "md";
|
|
1113
|
+
/**
|
|
1114
|
+
* 气泡是否打开
|
|
1115
|
+
*/
|
|
1116
|
+
open?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* 气泡是否默认打开
|
|
1119
|
+
*/
|
|
1120
|
+
defaultOpen?: boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* 气泡是否禁用
|
|
1123
|
+
*/
|
|
1124
|
+
disabled?: boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* 气泡标题
|
|
1127
|
+
*/
|
|
1128
|
+
title?: string;
|
|
1129
|
+
/**
|
|
1130
|
+
* 气泡标题是否危险
|
|
1131
|
+
*/
|
|
1132
|
+
titleDangerous?: boolean;
|
|
1133
|
+
/**
|
|
1134
|
+
* 气泡描述
|
|
1135
|
+
*/
|
|
1136
|
+
description?: string | React$1.ReactNode;
|
|
1137
|
+
/**
|
|
1138
|
+
* 气泡描述是否危险
|
|
1139
|
+
*/
|
|
1140
|
+
descriptionDangerous?: boolean;
|
|
1141
|
+
/**
|
|
1142
|
+
* 气泡样式类型
|
|
1143
|
+
*
|
|
1144
|
+
*
|
|
1145
|
+
* @default 'default'
|
|
1146
|
+
*/
|
|
1147
|
+
variant?: "default" | "info" | "message";
|
|
1148
|
+
/**
|
|
1149
|
+
* 气泡方向
|
|
1150
|
+
*
|
|
1151
|
+
* @default 'top'
|
|
1152
|
+
*/
|
|
1153
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
1154
|
+
/**
|
|
1155
|
+
* 气泡箭头位置
|
|
1156
|
+
*
|
|
1157
|
+
* @default 'center'
|
|
1158
|
+
*/
|
|
1159
|
+
align?: "start" | "center" | "end";
|
|
1160
|
+
/**
|
|
1161
|
+
* 内容偏移量
|
|
1162
|
+
*
|
|
1163
|
+
* @default 6
|
|
1164
|
+
*/
|
|
1165
|
+
sideOffset?: number;
|
|
1166
|
+
/**
|
|
1167
|
+
* 箭头偏移量
|
|
1168
|
+
*
|
|
1169
|
+
* @default -2
|
|
1170
|
+
*/
|
|
1171
|
+
alignOffset?: number;
|
|
1172
|
+
/**
|
|
1173
|
+
* 箭头样式
|
|
1174
|
+
*/
|
|
1175
|
+
arrowClassName?: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* 是否显示箭头
|
|
1178
|
+
*
|
|
1179
|
+
* @default true
|
|
1180
|
+
*/
|
|
1181
|
+
showArrow?: boolean;
|
|
1182
|
+
/**
|
|
1183
|
+
* 内容样式
|
|
1184
|
+
*/
|
|
1185
|
+
contentClassName?: string;
|
|
1186
|
+
/**
|
|
1187
|
+
* 触发器样式
|
|
1188
|
+
*/
|
|
1189
|
+
triggerClassName?: string;
|
|
1190
|
+
} & React$1.RefAttributes<never>>;
|
|
1191
|
+
|
|
1192
|
+
type BlockProps = {
|
|
1193
|
+
underline?: boolean;
|
|
1194
|
+
strikethrough?: boolean;
|
|
1195
|
+
strong?: boolean;
|
|
1196
|
+
italic?: boolean;
|
|
1197
|
+
dangerous?: boolean;
|
|
1198
|
+
};
|
|
1199
|
+
declare const dangerouText: (text: string) => string;
|
|
1200
|
+
declare const Heading: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1201
|
+
size?: "h1" | "h2" | "h3" | "h4" | "h5" | null | undefined;
|
|
1202
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1203
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1204
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1205
|
+
declare const Display: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1206
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
1207
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1208
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1209
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1210
|
+
declare const Title: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1211
|
+
size?: "h1" | "h2" | "h3" | "h4" | "h5" | null | undefined;
|
|
1212
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1213
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1214
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1215
|
+
declare const SubHeading: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1216
|
+
size?: "sm" | "lg" | null | undefined;
|
|
1217
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1218
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1219
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1220
|
+
declare const SubTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1221
|
+
size?: "sm" | "lg" | null | undefined;
|
|
1222
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1223
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1224
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1225
|
+
declare const Text: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1226
|
+
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1227
|
+
weight?: "regular" | "medium" | "semibold" | null | undefined;
|
|
1228
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1229
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1230
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1231
|
+
declare const Paragraph: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1232
|
+
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1233
|
+
weight?: "regular" | "medium" | "semibold" | null | undefined;
|
|
1234
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1235
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1236
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1237
|
+
declare const Description: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1238
|
+
size?: "sm" | "lg" | null | undefined;
|
|
1239
|
+
weight?: "regular" | "medium" | null | undefined;
|
|
1240
|
+
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "static" | "static-black" | "brand" | "critical" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | null | undefined;
|
|
1241
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1242
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1243
|
+
|
|
1244
|
+
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
1245
|
+
interface ToastViewportProps extends React$1.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> {
|
|
1246
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
|
|
1247
|
+
}
|
|
1248
|
+
declare const ToastViewport: React$1.ForwardRefExoticComponent<ToastViewportProps & React$1.RefAttributes<HTMLOListElement>>;
|
|
1249
|
+
declare const Toast$1: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
1250
|
+
variant?: "error" | "warning" | "success" | "info" | null | undefined;
|
|
1251
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-center" | "right-center" | null | undefined;
|
|
1252
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
|
|
1253
|
+
declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1254
|
+
declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1255
|
+
declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1256
|
+
declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1257
|
+
type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast$1>;
|
|
1258
|
+
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
1259
|
+
|
|
1260
|
+
interface ToasterProps {
|
|
1261
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
|
|
1262
|
+
}
|
|
1263
|
+
declare function Toaster({ position }?: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
1264
|
+
|
|
1265
|
+
type ToasterToast = ToastProps & {
|
|
1266
|
+
id: string;
|
|
1267
|
+
title?: React$1.ReactNode;
|
|
1268
|
+
description?: React$1.ReactNode;
|
|
1269
|
+
action?: ToastActionElement;
|
|
1270
|
+
};
|
|
1271
|
+
declare const actionTypes: {
|
|
1272
|
+
readonly ADD_TOAST: "ADD_TOAST";
|
|
1273
|
+
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
|
1274
|
+
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
|
1275
|
+
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
|
1276
|
+
};
|
|
1277
|
+
type ActionType = typeof actionTypes;
|
|
1278
|
+
type Action = {
|
|
1279
|
+
type: ActionType['ADD_TOAST'];
|
|
1280
|
+
toast: ToasterToast;
|
|
1281
|
+
} | {
|
|
1282
|
+
type: ActionType['UPDATE_TOAST'];
|
|
1283
|
+
toast: Partial<ToasterToast>;
|
|
1284
|
+
} | {
|
|
1285
|
+
type: ActionType['DISMISS_TOAST'];
|
|
1286
|
+
toastId?: ToasterToast['id'];
|
|
1287
|
+
} | {
|
|
1288
|
+
type: ActionType['REMOVE_TOAST'];
|
|
1289
|
+
toastId?: ToasterToast['id'];
|
|
1290
|
+
};
|
|
1291
|
+
interface State {
|
|
1292
|
+
toasts: ToasterToast[];
|
|
1293
|
+
}
|
|
1294
|
+
declare const reducer: (state: State, action: Action) => State;
|
|
1295
|
+
type Toast = Omit<ToasterToast, 'id'> & {
|
|
1296
|
+
actions?: {
|
|
1297
|
+
dismissText?: string;
|
|
1298
|
+
view?: string;
|
|
1299
|
+
viewUrl?: string;
|
|
1300
|
+
};
|
|
1301
|
+
toastId?: string;
|
|
1302
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
|
|
1303
|
+
};
|
|
1304
|
+
declare function toast({ actions, toastId, position, ...props }: Toast): {
|
|
1305
|
+
id: string;
|
|
1306
|
+
dismiss: () => void;
|
|
1307
|
+
update: (props: ToasterToast) => void;
|
|
1308
|
+
};
|
|
1309
|
+
declare function useToast(): {
|
|
1310
|
+
toast: typeof toast;
|
|
1311
|
+
dismiss: (toastId?: string) => void;
|
|
1312
|
+
toasts: ToasterToast[];
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
interface SwiperProps {
|
|
1316
|
+
/**
|
|
1317
|
+
* 轮播间隔延迟毫秒
|
|
1318
|
+
*/
|
|
1319
|
+
delay?: number;
|
|
1320
|
+
/**
|
|
1321
|
+
* 是否自动播放
|
|
1322
|
+
*/
|
|
1323
|
+
autoplay?: boolean;
|
|
1324
|
+
/**
|
|
1325
|
+
* 是否循环
|
|
1326
|
+
*/
|
|
1327
|
+
loop?: boolean;
|
|
1328
|
+
/**
|
|
1329
|
+
* 一屏显示slider数量,number|'auto'
|
|
1330
|
+
*/
|
|
1331
|
+
slidesPerView?: number | 'auto';
|
|
1332
|
+
/**
|
|
1333
|
+
* 轮播数据
|
|
1334
|
+
*/
|
|
1335
|
+
dataList: any;
|
|
1336
|
+
/**
|
|
1337
|
+
* 轮播类型 ,目前是特殊的'banner' | 'featured',其他自由配置
|
|
1338
|
+
*/
|
|
1339
|
+
swiperType: 'default' | 'banner' | 'featured' | 'grid';
|
|
1340
|
+
/**
|
|
1341
|
+
* 行数,仅在swiperType为'grid'时生效
|
|
1342
|
+
*/
|
|
1343
|
+
gridRows?: number;
|
|
1344
|
+
/**
|
|
1345
|
+
* 轮播子组件
|
|
1346
|
+
*/
|
|
1347
|
+
component?: React.ElementType;
|
|
1348
|
+
/**
|
|
1349
|
+
* Swiperbox样式覆盖
|
|
1350
|
+
*/
|
|
1351
|
+
className?: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* Swiper item样式覆盖
|
|
1354
|
+
*/
|
|
1355
|
+
componentClassName?: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Swiper Slide item样式覆盖
|
|
1358
|
+
*/
|
|
1359
|
+
slideClassName?: string;
|
|
1360
|
+
rounded?: 'none' | 'sm' | 'default' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
1361
|
+
/**
|
|
1362
|
+
* 从哪里来,点击跳转时带在url上
|
|
1363
|
+
*/
|
|
1364
|
+
from?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* 是否居中显示
|
|
1367
|
+
*/
|
|
1368
|
+
centeredSlides?: boolean;
|
|
1369
|
+
spaceBetween?: number;
|
|
1370
|
+
/**
|
|
1371
|
+
* 是否是移动端
|
|
1372
|
+
*/
|
|
1373
|
+
isMobile?: boolean;
|
|
1374
|
+
}
|
|
1375
|
+
declare function Swiper(props: SwiperProps): react_jsx_runtime.JSX.Element;
|
|
1376
|
+
|
|
1377
|
+
type ToastType = 'success' | 'info' | 'warning' | 'error';
|
|
1378
|
+
interface CustomToasterProps {
|
|
1379
|
+
id?: string;
|
|
1380
|
+
type?: ToastType;
|
|
1381
|
+
title?: string;
|
|
1382
|
+
content: string;
|
|
1383
|
+
isClosable?: boolean;
|
|
1384
|
+
translateInToast?: boolean;
|
|
1385
|
+
reason?: string;
|
|
1386
|
+
action?: React.ReactNode;
|
|
1387
|
+
loading?: boolean;
|
|
1388
|
+
}
|
|
1389
|
+
declare function useNotification(): {
|
|
1390
|
+
addToast: (config: CustomToasterProps, duration?: number) => void;
|
|
1391
|
+
success: (config: CustomToasterProps, duration?: number) => void;
|
|
1392
|
+
error: (config: CustomToasterProps, duration?: number) => void;
|
|
1393
|
+
warning: (config: CustomToasterProps, duration?: number) => void;
|
|
1394
|
+
info: (config: CustomToasterProps, duration?: number) => void;
|
|
1395
|
+
close: (id: string) => void;
|
|
1396
|
+
message: (config: CustomToasterProps, duration?: number) => void;
|
|
1397
|
+
};
|
|
1398
|
+
declare class Message {
|
|
1399
|
+
private static _toast;
|
|
1400
|
+
static success(config: CustomToasterProps, duration?: number): void;
|
|
1401
|
+
static error(config: CustomToasterProps, duration?: number): void;
|
|
1402
|
+
static info(config: CustomToasterProps, duration?: number): void;
|
|
1403
|
+
static warning(config: CustomToasterProps, duration?: number): void;
|
|
1404
|
+
static close(id: string): void;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* 与原生应用交互的钩子
|
|
1409
|
+
*/
|
|
1410
|
+
declare function useNativeBridge(): {
|
|
1411
|
+
callNative: (action: string, data?: any) => void;
|
|
1412
|
+
getIosUrl: (path: string) => string;
|
|
1413
|
+
nativeGoBack: () => void;
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
declare const useDevice: () => {
|
|
1417
|
+
isMobile: boolean;
|
|
1418
|
+
isIos: boolean;
|
|
1419
|
+
isWeixin: boolean;
|
|
1420
|
+
};
|
|
1421
|
+
declare const useIsMobileByWindowWidth: () => boolean;
|
|
1422
|
+
|
|
1423
|
+
declare const useWindowWidth: () => number;
|
|
1424
|
+
|
|
1425
|
+
declare global {
|
|
1426
|
+
interface Window {
|
|
1427
|
+
webkitAudioContext: typeof AudioContext;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarImage, AvatarRoot, Button, type ButtonProps, type CascaderOption, Checkbox, 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, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Guide, Heading, type HeroIcon$1 as HeroIcon, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonProps, type IconComponent, type IconProps, Image, type ImageProps, Input, type InputProps, Label, Link, type LinkProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, NavigationBar, NumberInput, Paragraph, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, type SearchInputProps, SecondaryNavigationBar, 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, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, 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, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|