@gomeniucivan/ui 1.0.32 → 1.0.35
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.d.mts +4052 -0
- package/dist/index.d.ts +4052 -1
- package/dist/index.js +33546 -9
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +33350 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +158 -81
- package/dist/index.cjs +0 -10
- package/dist/style.css +0 -2
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4052 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { AnchorHTMLAttributes, HTMLAttributes, FC, Ref, ElementType, ReactNode, CSSProperties, DOMAttributes, Key, ReactElement, ComponentPropsWithRef, RefAttributes, Context, MouseEvent, ComponentProps, ComponentType, KeyboardEvent } from 'react';
|
|
3
|
+
import { LucideProps, LucideIcon } from 'lucide-react';
|
|
4
|
+
import { TooltipPopupProps, TooltipPortalProps as TooltipPortalProps$1, TooltipPositionerProps as TooltipPositionerProps$1, Tooltip as Tooltip$1, TooltipTriggerProps } from '@base-ui/react/tooltip';
|
|
5
|
+
import { Placement as Placement$1 } from '@floating-ui/react';
|
|
6
|
+
import * as _base_ui_react_menu from '@base-ui/react/menu';
|
|
7
|
+
import { MenuRootProps, MenuPopupProps, MenuPortalProps, MenuPositionerProps, MenuTriggerProps, Menu as Menu$1 } from '@base-ui/react/menu';
|
|
8
|
+
import { MenuProps as MenuProps$1, MenuRef, AlertProps as AlertProps$1, AutoCompleteProps as AutoCompleteProps$1, AvatarProps as AvatarProps$1, DrawerProps as DrawerProps$1, ButtonProps as ButtonProps$1, CollapseProps as CollapseProps$1, DatePickerProps as DatePickerProps$1, InputProps as InputProps$1, InputRef, InputNumberProps as InputNumberProps$1, TagProps as TagProps$1, FormProps as FormProps$1, FormInstance, Form as Form$1, ModalProps as ModalProps$1, ImageProps as ImageProps$2, SelectProps as SelectProps$1, TabsProps as TabsProps$1, AnchorProps, SegmentedProps as SegmentedProps$1, RefSelectProps, SliderSingleProps } from 'antd';
|
|
9
|
+
export { FormInstance } from 'antd';
|
|
10
|
+
import { MenuItemType as MenuItemType$1, SubMenuType as SubMenuType$1, MenuItemGroupType as MenuItemGroupType$1, MenuDividerType as MenuDividerType$1, MenuInfo } from 'rc-menu/es/interface';
|
|
11
|
+
export { MenuInfo } from 'rc-menu/es/interface';
|
|
12
|
+
import { AlertRef } from 'antd/lib/alert/Alert';
|
|
13
|
+
import { FileDiffOptions } from '@pierre/diffs';
|
|
14
|
+
import { ItemType as ItemType$1 } from 'rc-collapse/es/interface';
|
|
15
|
+
import * as motion_react from 'motion/react';
|
|
16
|
+
import { HTMLMotionProps, Transition, TargetAndTransition } from 'motion/react';
|
|
17
|
+
import * as m from 'motion/react-m';
|
|
18
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
19
|
+
import { Size, NumberSize } from 're-resizable';
|
|
20
|
+
import { Props as Props$1 } from 'react-rnd';
|
|
21
|
+
import { DropdownProps as DropdownProps$1 } from 'antd/es';
|
|
22
|
+
import { OTPProps, OTPRef } from 'antd/es/input/OTP';
|
|
23
|
+
import { PasswordProps } from 'antd/es/input/Password';
|
|
24
|
+
import { TextAreaProps as TextAreaProps$2, TextAreaRef } from 'antd/es/input/TextArea';
|
|
25
|
+
import { InputNumberRef } from 'rc-input-number';
|
|
26
|
+
import * as _base_ui_react_autocomplete from '@base-ui/react/autocomplete';
|
|
27
|
+
import { Autocomplete, AutocompleteRootChangeEventDetails, AutocompleteRootProps } from '@base-ui/react/autocomplete';
|
|
28
|
+
import * as _base_ui_react_popover from '@base-ui/react/popover';
|
|
29
|
+
import { PopoverBackdropProps as PopoverBackdropProps$1, PopoverPopupProps as PopoverPopupProps$1, PopoverPortalProps as PopoverPortalProps$1, PopoverPositionerProps as PopoverPositionerProps$1, Popover as Popover$1, PopoverTriggerProps } from '@base-ui/react/popover';
|
|
30
|
+
import { FooterProps as FooterProps$1 } from 'rc-footer';
|
|
31
|
+
import { FormItemProps as FormItemProps$1 } from 'antd/es/form/FormItem';
|
|
32
|
+
import { BuiltinTheme } from 'shiki';
|
|
33
|
+
import { PreviewConfig } from 'antd/es/image';
|
|
34
|
+
import { GroupPreviewConfig } from 'antd/es/image/PreviewGroup';
|
|
35
|
+
import * as node_modules__base_ui_react_esm_separator_Separator from 'node_modules/@base-ui/react/esm/separator/Separator';
|
|
36
|
+
import * as _base_ui_react_select from '@base-ui/react/select';
|
|
37
|
+
import { Select as Select$1 } from '@base-ui/react/select';
|
|
38
|
+
import { Switch } from '@base-ui/react/switch';
|
|
39
|
+
import { Components, Options } from 'react-markdown';
|
|
40
|
+
import { Pluggable } from 'unified';
|
|
41
|
+
import { MermaidConfig } from 'mermaid';
|
|
42
|
+
import { Node } from 'unist';
|
|
43
|
+
import { Root } from 'hast';
|
|
44
|
+
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
45
|
+
import { GetCustomStylish, GetCustomToken, ThemeProviderProps as ThemeProviderProps$1, CustomStylishParams, CustomTokenParams, ThemeMode } from 'antd-style';
|
|
46
|
+
import { AliasToken } from 'antd/es/theme/interface';
|
|
47
|
+
import { Toast } from '@base-ui/react/toast';
|
|
48
|
+
export { ErrorBoundary, ErrorBoundaryProps } from 'react-error-boundary';
|
|
49
|
+
|
|
50
|
+
interface LobeCustomStylish {
|
|
51
|
+
active: string;
|
|
52
|
+
blur: string;
|
|
53
|
+
blurStrong: string;
|
|
54
|
+
bottomScrollbar: string;
|
|
55
|
+
disabled: string;
|
|
56
|
+
gradientAnimation: string;
|
|
57
|
+
noScrollbar: string;
|
|
58
|
+
resetLinkColor: string;
|
|
59
|
+
shadow: string;
|
|
60
|
+
variantBorderless: string;
|
|
61
|
+
variantBorderlessDanger: string;
|
|
62
|
+
variantBorderlessWithoutHover: string;
|
|
63
|
+
variantFilled: string;
|
|
64
|
+
variantFilledDanger: string;
|
|
65
|
+
variantFilledWithoutHover: string;
|
|
66
|
+
variantOutlined: string;
|
|
67
|
+
variantOutlinedDanger: string;
|
|
68
|
+
variantOutlinedWithoutHover: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
|
|
72
|
+
declare const PresetSystemColors: readonly ["Error", "Warning", "Success", "Info"];
|
|
73
|
+
type PresetColorKey = (typeof PresetColors)[number];
|
|
74
|
+
type PresetSystemColorKey = (typeof PresetSystemColors)[number];
|
|
75
|
+
type PresetColorType = Record<PresetColorKey, string>;
|
|
76
|
+
type PresetSystemColorType = Record<PresetSystemColorKey, string>;
|
|
77
|
+
type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
78
|
+
type ColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary' | 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
|
|
79
|
+
type SystemColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary';
|
|
80
|
+
type ColorToken = {
|
|
81
|
+
[key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
|
|
82
|
+
};
|
|
83
|
+
type SystemColorToken = {
|
|
84
|
+
[key in `color${keyof PresetSystemColorType}${SystemColorTokenKey}`]: string;
|
|
85
|
+
};
|
|
86
|
+
type ColorPalettes = {
|
|
87
|
+
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
|
|
88
|
+
};
|
|
89
|
+
type ColorPalettesAlpha = {
|
|
90
|
+
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
|
|
91
|
+
};
|
|
92
|
+
interface LobeCustomToken extends ColorPalettes, ColorPalettesAlpha, ColorToken, SystemColorToken {
|
|
93
|
+
colorBgContainerSecondary: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Common trigger type for components that support hover/click interactions
|
|
98
|
+
*/
|
|
99
|
+
type Trigger = 'hover' | 'click' | 'both' | ('hover' | 'click')[];
|
|
100
|
+
|
|
101
|
+
type DivProps$1 = HTMLAttributes<HTMLDivElement>;
|
|
102
|
+
type VideoProps$2 = HTMLAttributes<HTMLVideoElement>;
|
|
103
|
+
type SvgProps = HTMLAttributes<SVGSVGElement>;
|
|
104
|
+
type ImgProps = HTMLAttributes<HTMLImageElement>;
|
|
105
|
+
type AProps = AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
106
|
+
type TextAreaProps$1 = HTMLAttributes<HTMLTextAreaElement>;
|
|
107
|
+
type SpanProps = HTMLAttributes<HTMLSpanElement>;
|
|
108
|
+
|
|
109
|
+
declare const A: FC<AProps & {
|
|
110
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
111
|
+
}>;
|
|
112
|
+
|
|
113
|
+
type ContentPosition = 'center' | 'end' | 'flex-end' | 'flex-start' | 'start' | 'stretch' | 'baseline';
|
|
114
|
+
type FlexDirection = 'vertical' | 'vertical-reverse' | 'horizontal' | 'horizontal-reverse';
|
|
115
|
+
type DivProps = DOMAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>;
|
|
116
|
+
type CommonSpaceNumber = 2 | 4 | 8 | 12 | 16 | 24;
|
|
117
|
+
/**
|
|
118
|
+
* Flexbox 布局组件的接口
|
|
119
|
+
*/
|
|
120
|
+
interface IFlexbox {
|
|
121
|
+
/**
|
|
122
|
+
* 交叉轴对齐方式
|
|
123
|
+
* @default "stretch"
|
|
124
|
+
*/
|
|
125
|
+
align?: ContentPosition;
|
|
126
|
+
/**
|
|
127
|
+
* 允许在 flex 布局中正常收缩(通过将根节点的 min-width 设为 0 实现)
|
|
128
|
+
*
|
|
129
|
+
* 在 Flex 容器(或作为 flex item)中,启用该选项可避免内容导致的溢出,
|
|
130
|
+
* 让元素可以正常 shrink(常见于文本省略、滚动容器等场景)。
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
allowShrink?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* 渲染的 HTML 元素类型
|
|
136
|
+
* @default "div"
|
|
137
|
+
*/
|
|
138
|
+
as?: ElementType;
|
|
139
|
+
/**
|
|
140
|
+
* 子元素
|
|
141
|
+
*/
|
|
142
|
+
children?: ReactNode;
|
|
143
|
+
/**
|
|
144
|
+
* 自定义类名
|
|
145
|
+
*/
|
|
146
|
+
className?: string;
|
|
147
|
+
/**
|
|
148
|
+
* 主轴方向
|
|
149
|
+
* @default "horizontal"
|
|
150
|
+
*/
|
|
151
|
+
direction?: FlexDirection;
|
|
152
|
+
/**
|
|
153
|
+
* 内容分布
|
|
154
|
+
*/
|
|
155
|
+
distribution?: CSSProperties['justifyContent'];
|
|
156
|
+
/**
|
|
157
|
+
* flex 值
|
|
158
|
+
* @default "0 1 auto"
|
|
159
|
+
*/
|
|
160
|
+
flex?: number | string;
|
|
161
|
+
/**
|
|
162
|
+
* 主轴方向上的间距
|
|
163
|
+
* @default 0
|
|
164
|
+
*/
|
|
165
|
+
gap?: CommonSpaceNumber | number | string;
|
|
166
|
+
/**
|
|
167
|
+
* 高度
|
|
168
|
+
* @default "auto"
|
|
169
|
+
*/
|
|
170
|
+
height?: number | string;
|
|
171
|
+
/**
|
|
172
|
+
* 是否横向
|
|
173
|
+
* @default false
|
|
174
|
+
*/
|
|
175
|
+
horizontal?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* 主轴对齐方式
|
|
178
|
+
*/
|
|
179
|
+
justify?: CSSProperties['justifyContent'];
|
|
180
|
+
/**
|
|
181
|
+
* 内边距
|
|
182
|
+
* @default 0
|
|
183
|
+
*/
|
|
184
|
+
padding?: string | number | CommonSpaceNumber;
|
|
185
|
+
/**
|
|
186
|
+
* 块内边距
|
|
187
|
+
*/
|
|
188
|
+
paddingBlock?: string | number;
|
|
189
|
+
/**
|
|
190
|
+
* 内联内边距
|
|
191
|
+
*/
|
|
192
|
+
paddingInline?: string | number;
|
|
193
|
+
/**
|
|
194
|
+
* 类名前缀
|
|
195
|
+
*/
|
|
196
|
+
prefixCls?: string;
|
|
197
|
+
/**
|
|
198
|
+
* ref 引用
|
|
199
|
+
*/
|
|
200
|
+
ref?: Ref<HTMLElement>;
|
|
201
|
+
/**
|
|
202
|
+
* 自定义样式
|
|
203
|
+
*/
|
|
204
|
+
style?: CSSProperties;
|
|
205
|
+
/**
|
|
206
|
+
* 是否显示
|
|
207
|
+
* @default true
|
|
208
|
+
*/
|
|
209
|
+
visible?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* 宽度
|
|
212
|
+
* @default "auto"
|
|
213
|
+
*/
|
|
214
|
+
width?: number | string;
|
|
215
|
+
/**
|
|
216
|
+
* 换行方式
|
|
217
|
+
*/
|
|
218
|
+
wrap?: CSSProperties['flexWrap'];
|
|
219
|
+
}
|
|
220
|
+
interface FlexBasicProps extends IFlexbox, DivProps {
|
|
221
|
+
}
|
|
222
|
+
type FlexboxProps = FlexBasicProps;
|
|
223
|
+
type CenterProps = Omit<FlexBasicProps, 'distribution' | 'direction' | 'align'>;
|
|
224
|
+
|
|
225
|
+
declare const Center: FC<CenterProps>;
|
|
226
|
+
|
|
227
|
+
declare const _default$9: react.NamedExoticComponent<FlexBasicProps>;
|
|
228
|
+
|
|
229
|
+
interface BlockProps extends FlexboxProps {
|
|
230
|
+
clickable?: boolean;
|
|
231
|
+
glass?: boolean;
|
|
232
|
+
ref?: Ref<HTMLDivElement>;
|
|
233
|
+
shadow?: boolean;
|
|
234
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare const Block: FC<BlockProps>;
|
|
238
|
+
|
|
239
|
+
interface AccordionItemProps extends Pick<BlockProps, 'padding' | 'paddingBlock' | 'paddingInline' | 'variant' | 'ref'> {
|
|
240
|
+
/**
|
|
241
|
+
* Action component that appears on hover
|
|
242
|
+
*/
|
|
243
|
+
action?: ReactNode;
|
|
244
|
+
/**
|
|
245
|
+
* Whether to allow expanding (hide indicator when false)
|
|
246
|
+
* @default true
|
|
247
|
+
*/
|
|
248
|
+
allowExpand?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Content of the accordion item
|
|
251
|
+
*/
|
|
252
|
+
children?: ReactNode;
|
|
253
|
+
/**
|
|
254
|
+
* Custom classNames for child elements
|
|
255
|
+
*/
|
|
256
|
+
classNames?: {
|
|
257
|
+
action?: string;
|
|
258
|
+
base?: string;
|
|
259
|
+
content?: string;
|
|
260
|
+
header?: string;
|
|
261
|
+
indicator?: string;
|
|
262
|
+
title?: string;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Default expanded state (uncontrolled)
|
|
266
|
+
*/
|
|
267
|
+
defaultExpand?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Whether the item is disabled
|
|
270
|
+
*/
|
|
271
|
+
disabled?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Controlled expanded state
|
|
274
|
+
*/
|
|
275
|
+
expand?: boolean;
|
|
276
|
+
headerWrapper?: (header: ReactNode) => ReactNode;
|
|
277
|
+
/**
|
|
278
|
+
* Whether to hide the chevron indicator
|
|
279
|
+
* @default false
|
|
280
|
+
*/
|
|
281
|
+
hideIndicator?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Custom indicator component or function
|
|
284
|
+
*/
|
|
285
|
+
indicator?: ReactNode | ((props: {
|
|
286
|
+
isDisabled?: boolean;
|
|
287
|
+
isOpen: boolean;
|
|
288
|
+
}) => ReactNode);
|
|
289
|
+
/**
|
|
290
|
+
* Indicator placement
|
|
291
|
+
* @default 'start'
|
|
292
|
+
*/
|
|
293
|
+
indicatorPlacement?: 'end' | 'start';
|
|
294
|
+
/**
|
|
295
|
+
* Unique identifier for the item (use as React key)
|
|
296
|
+
*/
|
|
297
|
+
itemKey: Key;
|
|
298
|
+
/**
|
|
299
|
+
* Callback when expanded state changes
|
|
300
|
+
*/
|
|
301
|
+
onExpandChange?: (expanded: boolean) => void;
|
|
302
|
+
/**
|
|
303
|
+
* Custom styles for child elements
|
|
304
|
+
*/
|
|
305
|
+
styles?: {
|
|
306
|
+
action?: CSSProperties;
|
|
307
|
+
base?: CSSProperties;
|
|
308
|
+
content?: CSSProperties;
|
|
309
|
+
header?: CSSProperties;
|
|
310
|
+
indicator?: CSSProperties;
|
|
311
|
+
title?: CSSProperties;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Title of the accordion item
|
|
315
|
+
*/
|
|
316
|
+
title: ReactNode;
|
|
317
|
+
}
|
|
318
|
+
interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, Pick<BlockProps, 'variant' | 'ref'> {
|
|
319
|
+
/**
|
|
320
|
+
* Whether only one item can be expanded at a time
|
|
321
|
+
* @default false
|
|
322
|
+
*/
|
|
323
|
+
accordion?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Accordion items
|
|
326
|
+
*/
|
|
327
|
+
children?: ReactNode;
|
|
328
|
+
/**
|
|
329
|
+
* Custom classNames for child elements
|
|
330
|
+
*/
|
|
331
|
+
classNames?: {
|
|
332
|
+
base?: string;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Default expanded keys (uncontrolled)
|
|
336
|
+
*/
|
|
337
|
+
defaultExpandedKeys?: Key[];
|
|
338
|
+
/**
|
|
339
|
+
* Disable animation
|
|
340
|
+
* @default false
|
|
341
|
+
*/
|
|
342
|
+
disableAnimation?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Controlled expanded keys
|
|
345
|
+
*/
|
|
346
|
+
expandedKeys?: Key[];
|
|
347
|
+
/**
|
|
348
|
+
* Gap between accordion items
|
|
349
|
+
*/
|
|
350
|
+
gap?: number;
|
|
351
|
+
/**
|
|
352
|
+
* Whether to hide the chevron indicator for all items
|
|
353
|
+
* @default false
|
|
354
|
+
*/
|
|
355
|
+
hideIndicator?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Indicator placement for all items
|
|
358
|
+
* @default 'start'
|
|
359
|
+
*/
|
|
360
|
+
indicatorPlacement?: 'end' | 'start';
|
|
361
|
+
/**
|
|
362
|
+
* Keep content mounted when collapsed
|
|
363
|
+
* @default true
|
|
364
|
+
*/
|
|
365
|
+
keepContentMounted?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Motion props for motion animation
|
|
368
|
+
*/
|
|
369
|
+
motionProps?: any;
|
|
370
|
+
/**
|
|
371
|
+
* Callback when expanded keys change
|
|
372
|
+
*/
|
|
373
|
+
onExpandedChange?: (keys: Key[]) => void;
|
|
374
|
+
/**
|
|
375
|
+
* Whether to show dividers between items
|
|
376
|
+
* @default false
|
|
377
|
+
*/
|
|
378
|
+
showDivider?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* Custom styles for child elements
|
|
381
|
+
*/
|
|
382
|
+
styles?: {
|
|
383
|
+
base?: CSSProperties;
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
declare const Accordion: react.NamedExoticComponent<AccordionProps>;
|
|
388
|
+
|
|
389
|
+
declare const AccordionItem: react.NamedExoticComponent<AccordionItemProps>;
|
|
390
|
+
|
|
391
|
+
interface IconSizeConfig extends Pick<LucideProps, 'strokeWidth' | 'absoluteStrokeWidth'> {
|
|
392
|
+
size?: number | string;
|
|
393
|
+
}
|
|
394
|
+
type IconSizeType = 'large' | 'middle' | 'small';
|
|
395
|
+
type IconSize = number | IconSizeType | IconSizeConfig;
|
|
396
|
+
type LucideIconProps = Pick<LucideProps, 'fill' | 'fillRule' | 'fillOpacity' | 'color' | 'focusable'>;
|
|
397
|
+
interface IconProps$1 extends Omit<SpanProps, 'children'>, LucideIconProps {
|
|
398
|
+
icon: LucideIcon | FC<any> | ReactNode;
|
|
399
|
+
ref?: Ref<SVGSVGElement>;
|
|
400
|
+
size?: IconSize;
|
|
401
|
+
spin?: boolean;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
type IconContentConfig = Omit<IconProps$1, 'icon' | 'ref'>;
|
|
405
|
+
declare const IconProvider: react.NamedExoticComponent<{
|
|
406
|
+
children: ReactNode;
|
|
407
|
+
config?: IconContentConfig;
|
|
408
|
+
}>;
|
|
409
|
+
|
|
410
|
+
declare const Icon: react.NamedExoticComponent<IconProps$1>;
|
|
411
|
+
|
|
412
|
+
declare const KeyMapEnum: {
|
|
413
|
+
readonly Alt: "alt";
|
|
414
|
+
readonly Backquote: "backquote";
|
|
415
|
+
readonly Backslash: "backslash";
|
|
416
|
+
readonly Backspace: "backspace";
|
|
417
|
+
readonly BracketLeft: "bracketleft";
|
|
418
|
+
readonly BracketRight: "bracketright";
|
|
419
|
+
readonly Comma: "comma";
|
|
420
|
+
readonly CommandOrControl: "commandorcontrol";
|
|
421
|
+
readonly Control: "control";
|
|
422
|
+
readonly Ctrl: "ctrl";
|
|
423
|
+
readonly Down: "down";
|
|
424
|
+
readonly Enter: "enter";
|
|
425
|
+
readonly Equal: "equal";
|
|
426
|
+
readonly Esc: "esc";
|
|
427
|
+
readonly Left: "left";
|
|
428
|
+
readonly LeftClick: "left-click";
|
|
429
|
+
readonly LeftDoubleClick: "left-double-click";
|
|
430
|
+
readonly Meta: "meta";
|
|
431
|
+
readonly MiddleClick: "middle-click";
|
|
432
|
+
readonly Minus: "minus";
|
|
433
|
+
readonly Mod: "mod";
|
|
434
|
+
readonly Period: "period";
|
|
435
|
+
readonly Plus: "equal";
|
|
436
|
+
readonly QuestionMark: "slash";
|
|
437
|
+
readonly Quote: "quote";
|
|
438
|
+
readonly Right: "right";
|
|
439
|
+
readonly RightClick: "right-click";
|
|
440
|
+
readonly RightDoubleClick: "right-double-click";
|
|
441
|
+
readonly Semicolon: "semicolon";
|
|
442
|
+
readonly Shift: "shift";
|
|
443
|
+
readonly Slash: "slash";
|
|
444
|
+
readonly Space: "space";
|
|
445
|
+
readonly Tab: "tab";
|
|
446
|
+
readonly Up: "up";
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
interface HotkeyProps extends Omit<FlexboxProps, 'children'> {
|
|
450
|
+
classNames?: {
|
|
451
|
+
kbdClassName?: string;
|
|
452
|
+
};
|
|
453
|
+
compact?: boolean;
|
|
454
|
+
inverseTheme?: boolean;
|
|
455
|
+
isApple?: boolean;
|
|
456
|
+
keys: string;
|
|
457
|
+
styles?: {
|
|
458
|
+
kbdStyle?: CSSProperties;
|
|
459
|
+
};
|
|
460
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
declare const Hotkey: react.NamedExoticComponent<HotkeyProps>;
|
|
464
|
+
|
|
465
|
+
declare const combineKeys: (keys: string[]) => string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Base UI uses a small set of string literal unions for alignment and side.
|
|
469
|
+
* We re-declare them here to avoid importing internal/non-exported Base UI paths.
|
|
470
|
+
*/
|
|
471
|
+
type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
472
|
+
type Align = 'start' | 'center' | 'end';
|
|
473
|
+
type PlacementConfig = {
|
|
474
|
+
align: Align;
|
|
475
|
+
side: Side;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* All supported placement values
|
|
479
|
+
* - Unified placement names for Tooltip, Popover, and DropdownMenu
|
|
480
|
+
* - Ant Design style: topLeft, topCenter, topRight, etc.
|
|
481
|
+
* - Additional aliases: top (same as topCenter), bottom (same as bottomCenter)
|
|
482
|
+
*/
|
|
483
|
+
type Placement = 'top' | 'topLeft' | 'topCenter' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom';
|
|
484
|
+
/**
|
|
485
|
+
* Map of placement values to Base UI placement config
|
|
486
|
+
* Used by Popover and DropdownMenu components
|
|
487
|
+
*/
|
|
488
|
+
declare const placementMap: Record<Placement, PlacementConfig>;
|
|
489
|
+
/**
|
|
490
|
+
* Convert unified Placement to Floating UI placement format
|
|
491
|
+
* Used by Tooltip component which uses @floating-ui/react
|
|
492
|
+
*
|
|
493
|
+
* @param placement - Unified placement value
|
|
494
|
+
* @returns Floating UI placement (e.g., 'top-start', 'bottom-end')
|
|
495
|
+
*/
|
|
496
|
+
declare const toFloatingUIPlacement: (placement?: Placement) => Placement$1;
|
|
497
|
+
|
|
498
|
+
type TooltipPlacement = Placement;
|
|
499
|
+
/**
|
|
500
|
+
* Base UI Positioner props that can be passed through
|
|
501
|
+
*/
|
|
502
|
+
type TooltipPositionerProps = Omit<TooltipPositionerProps$1, 'className' | 'style' | 'children'>;
|
|
503
|
+
/**
|
|
504
|
+
* Base UI Trigger props that can be passed through
|
|
505
|
+
*/
|
|
506
|
+
type TooltipTriggerComponentProps = Omit<TooltipTriggerProps, 'className' | 'style' | 'children' | 'render' | 'handle' | 'payload'>;
|
|
507
|
+
/**
|
|
508
|
+
* Base UI Popup props that can be passed through
|
|
509
|
+
*/
|
|
510
|
+
type TooltipPopupComponentProps = Omit<TooltipPopupProps, 'className' | 'style' | 'children'>;
|
|
511
|
+
/**
|
|
512
|
+
* Base UI Portal props that can be passed through
|
|
513
|
+
*/
|
|
514
|
+
type TooltipPortalProps = Omit<TooltipPortalProps$1, 'children' | 'container'>;
|
|
515
|
+
interface TooltipProps {
|
|
516
|
+
/**
|
|
517
|
+
* Whether the tooltip has an arrow pointer.
|
|
518
|
+
* @default false
|
|
519
|
+
*/
|
|
520
|
+
arrow?: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* Trigger element. Prefer a single React element.
|
|
523
|
+
*/
|
|
524
|
+
children: ReactElement | ReactNode;
|
|
525
|
+
/**
|
|
526
|
+
* Custom className for the tooltip floating root.
|
|
527
|
+
*/
|
|
528
|
+
className?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Compatible with Ant Design `classNames` shape (subset).
|
|
531
|
+
*/
|
|
532
|
+
classNames?: {
|
|
533
|
+
arrow?: string;
|
|
534
|
+
container?: string;
|
|
535
|
+
content?: string;
|
|
536
|
+
root?: string;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* Delay (in milliseconds) before closing the tooltip.
|
|
540
|
+
* Takes precedence over `mouseLeaveDelay`.
|
|
541
|
+
*/
|
|
542
|
+
closeDelay?: number;
|
|
543
|
+
/**
|
|
544
|
+
* Uncontrolled initial open state.
|
|
545
|
+
*/
|
|
546
|
+
defaultOpen?: boolean;
|
|
547
|
+
/**
|
|
548
|
+
* Disable tooltip behavior.
|
|
549
|
+
*/
|
|
550
|
+
disabled?: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* An Ant Design compatible escape hatch for portal container.
|
|
553
|
+
*/
|
|
554
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
555
|
+
hotkey?: string;
|
|
556
|
+
hotkeyProps?: Omit<HotkeyProps, 'keys'>;
|
|
557
|
+
/**
|
|
558
|
+
* Delay (in seconds) before showing the tooltip on hover.
|
|
559
|
+
* Kept compatible with Ant Design `Tooltip`.
|
|
560
|
+
*/
|
|
561
|
+
mouseEnterDelay?: number;
|
|
562
|
+
/**
|
|
563
|
+
* Delay (in seconds) before hiding the tooltip on hover out.
|
|
564
|
+
* Kept compatible with Ant Design `Tooltip`.
|
|
565
|
+
*/
|
|
566
|
+
mouseLeaveDelay?: number;
|
|
567
|
+
/**
|
|
568
|
+
* Callback when open state changes.
|
|
569
|
+
*/
|
|
570
|
+
onOpenChange?: (open: boolean) => void;
|
|
571
|
+
/**
|
|
572
|
+
* Controlled open state.
|
|
573
|
+
*/
|
|
574
|
+
open?: boolean;
|
|
575
|
+
/**
|
|
576
|
+
* Delay (in milliseconds) before opening the tooltip.
|
|
577
|
+
* Takes precedence over `mouseEnterDelay`.
|
|
578
|
+
*/
|
|
579
|
+
openDelay?: number;
|
|
580
|
+
/**
|
|
581
|
+
* Tooltip placement. Supports Floating UI placements and Ant Design legacy placements.
|
|
582
|
+
*/
|
|
583
|
+
placement?: TooltipPlacement;
|
|
584
|
+
/**
|
|
585
|
+
* Base UI Popup 组件的 props
|
|
586
|
+
*/
|
|
587
|
+
popupProps?: TooltipPopupComponentProps;
|
|
588
|
+
/**
|
|
589
|
+
* Base UI Portal 组件的 props
|
|
590
|
+
*/
|
|
591
|
+
portalProps?: TooltipPortalProps;
|
|
592
|
+
/**
|
|
593
|
+
* Base UI Positioner 组件的 props
|
|
594
|
+
*/
|
|
595
|
+
positionerProps?: TooltipPositionerProps;
|
|
596
|
+
ref?: ComponentPropsWithRef<typeof Tooltip$1.Trigger>['ref'];
|
|
597
|
+
/**
|
|
598
|
+
* When true, this tooltip will render independently even inside a TooltipGroup,
|
|
599
|
+
* ignoring the group singleton behavior.
|
|
600
|
+
*/
|
|
601
|
+
standalone?: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Compatible with Ant Design `styles` shape (subset).
|
|
604
|
+
*/
|
|
605
|
+
styles?: {
|
|
606
|
+
arrow?: CSSProperties;
|
|
607
|
+
/**
|
|
608
|
+
* Backwards-compatible alias for the floating root style.
|
|
609
|
+
*/
|
|
610
|
+
container?: CSSProperties;
|
|
611
|
+
content?: CSSProperties;
|
|
612
|
+
root?: CSSProperties;
|
|
613
|
+
};
|
|
614
|
+
/**
|
|
615
|
+
* Tooltip content.
|
|
616
|
+
*/
|
|
617
|
+
title: ReactNode;
|
|
618
|
+
/**
|
|
619
|
+
* Base UI Trigger 组件的 props
|
|
620
|
+
*/
|
|
621
|
+
triggerProps?: TooltipTriggerComponentProps;
|
|
622
|
+
/**
|
|
623
|
+
* z-index for tooltip floating root.
|
|
624
|
+
*/
|
|
625
|
+
zIndex?: number;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Props for `TooltipGroup`.
|
|
629
|
+
*/
|
|
630
|
+
interface TooltipGroupProps {
|
|
631
|
+
arrow?: boolean;
|
|
632
|
+
children: ReactNode;
|
|
633
|
+
className?: string;
|
|
634
|
+
classNames?: TooltipProps['classNames'];
|
|
635
|
+
closeDelay?: number;
|
|
636
|
+
/**
|
|
637
|
+
* Disable the "destroy on invalid trigger (display:none / disconnected)" guard for performance.
|
|
638
|
+
* @default false
|
|
639
|
+
*/
|
|
640
|
+
disableDestroyOnInvalidTrigger?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Disable the "hide when positioner falls back to (0,0)" visual guard for performance.
|
|
643
|
+
* @default false
|
|
644
|
+
*/
|
|
645
|
+
disableZeroOriginGuard?: boolean;
|
|
646
|
+
disabled?: boolean;
|
|
647
|
+
getPopupContainer?: TooltipProps['getPopupContainer'];
|
|
648
|
+
hotkey?: string;
|
|
649
|
+
hotkeyProps?: Omit<HotkeyProps, 'keys'>;
|
|
650
|
+
layoutAnimation?: boolean;
|
|
651
|
+
mouseEnterDelay?: number;
|
|
652
|
+
mouseLeaveDelay?: number;
|
|
653
|
+
openDelay?: number;
|
|
654
|
+
placement?: TooltipPlacement;
|
|
655
|
+
popupProps?: TooltipPopupComponentProps;
|
|
656
|
+
portalProps?: TooltipPortalProps;
|
|
657
|
+
positionerProps?: TooltipPositionerProps;
|
|
658
|
+
styles?: TooltipProps['styles'];
|
|
659
|
+
triggerProps?: TooltipTriggerComponentProps;
|
|
660
|
+
zIndex?: number;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
664
|
+
|
|
665
|
+
declare const TooltipGroup: FC<TooltipGroupProps>;
|
|
666
|
+
|
|
667
|
+
interface ActionIconSizeConfig extends IconSizeConfig {
|
|
668
|
+
blockSize?: number | string;
|
|
669
|
+
borderRadius?: number | string;
|
|
670
|
+
}
|
|
671
|
+
type ActionIconSize = number | IconSizeType | ActionIconSizeConfig;
|
|
672
|
+
interface ActionIconProps extends Partial<LucideIconProps>, Omit<CenterProps, 'title' | 'children'> {
|
|
673
|
+
active?: boolean;
|
|
674
|
+
danger?: boolean;
|
|
675
|
+
disabled?: boolean;
|
|
676
|
+
glass?: boolean;
|
|
677
|
+
icon?: IconProps$1['icon'] | ReactNode;
|
|
678
|
+
loading?: boolean;
|
|
679
|
+
ref?: Ref<HTMLDivElement>;
|
|
680
|
+
shadow?: boolean;
|
|
681
|
+
size?: ActionIconSize;
|
|
682
|
+
spin?: boolean;
|
|
683
|
+
title?: TooltipProps['title'];
|
|
684
|
+
tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
|
|
685
|
+
variant?: 'borderless' | 'filled' | 'outlined';
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
declare const ActionIcon: react.NamedExoticComponent<ActionIconProps>;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Checkbox menu item shared by DropdownMenu / ContextMenu.
|
|
692
|
+
* This is intentionally aligned with Base UI's `Menu.CheckboxItem` API we use.
|
|
693
|
+
*/
|
|
694
|
+
interface MenuCheckboxItemType {
|
|
695
|
+
checked?: boolean;
|
|
696
|
+
closeOnClick?: boolean;
|
|
697
|
+
danger?: boolean;
|
|
698
|
+
defaultChecked?: boolean;
|
|
699
|
+
disabled?: boolean;
|
|
700
|
+
extra?: ReactNode;
|
|
701
|
+
icon?: IconProps$1['icon'];
|
|
702
|
+
key: Key;
|
|
703
|
+
label?: ReactNode;
|
|
704
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
705
|
+
title?: ReactNode;
|
|
706
|
+
type: 'checkbox';
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Switch menu item shared by DropdownMenu / ContextMenu.
|
|
711
|
+
* Similar to checkbox but renders as a toggle switch.
|
|
712
|
+
*/
|
|
713
|
+
interface MenuSwitchItemType {
|
|
714
|
+
checked?: boolean;
|
|
715
|
+
closeOnClick?: boolean;
|
|
716
|
+
danger?: boolean;
|
|
717
|
+
defaultChecked?: boolean;
|
|
718
|
+
disabled?: boolean;
|
|
719
|
+
extra?: ReactNode;
|
|
720
|
+
icon?: IconProps$1['icon'];
|
|
721
|
+
key: Key;
|
|
722
|
+
label?: ReactNode;
|
|
723
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
724
|
+
title?: ReactNode;
|
|
725
|
+
type: 'switch';
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
interface MenuItemType extends MenuItemType$1 {
|
|
729
|
+
/**
|
|
730
|
+
* Whether to close the menu when this item is clicked.
|
|
731
|
+
* Set to `false` to keep the menu open (useful for items with Upload, file picker, etc.)
|
|
732
|
+
* @default true
|
|
733
|
+
*/
|
|
734
|
+
closeOnClick?: boolean;
|
|
735
|
+
danger?: boolean;
|
|
736
|
+
icon?: IconProps$1['icon'];
|
|
737
|
+
loading?: boolean;
|
|
738
|
+
title?: string;
|
|
739
|
+
}
|
|
740
|
+
interface SubMenuType<T extends MenuItemType = MenuItemType> extends Omit<SubMenuType$1, 'children'> {
|
|
741
|
+
children: ItemType<T>[];
|
|
742
|
+
icon?: IconProps$1['icon'];
|
|
743
|
+
}
|
|
744
|
+
interface MenuItemGroupType<T extends MenuItemType = MenuItemType> extends Omit<MenuItemGroupType$1, 'children'> {
|
|
745
|
+
children?: ItemType<T>[];
|
|
746
|
+
key?: Key;
|
|
747
|
+
}
|
|
748
|
+
interface MenuDividerType extends MenuDividerType$1 {
|
|
749
|
+
dashed?: boolean;
|
|
750
|
+
key?: Key;
|
|
751
|
+
}
|
|
752
|
+
type ItemType<T extends MenuItemType = MenuItemType> = T | SubMenuType<T> | MenuItemGroupType<T> | MenuDividerType | null;
|
|
753
|
+
type GenericItemType<T = unknown> = T extends infer U extends MenuItemType ? unknown extends U ? ItemType : ItemType<U> : ItemType;
|
|
754
|
+
interface MenuProps<T = unknown> extends Omit<MenuProps$1, 'items'> {
|
|
755
|
+
compact?: boolean;
|
|
756
|
+
iconProps?: IconContentConfig;
|
|
757
|
+
items: GenericItemType<T>[];
|
|
758
|
+
ref?: Ref<MenuRef>;
|
|
759
|
+
shadow?: boolean;
|
|
760
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Group type for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
765
|
+
* Unlike MenuItemGroupType, this supports checkbox/switch items in children.
|
|
766
|
+
*/
|
|
767
|
+
interface BaseMenuItemGroupType {
|
|
768
|
+
children?: BaseMenuItemType[];
|
|
769
|
+
key?: Key;
|
|
770
|
+
label?: ReactNode;
|
|
771
|
+
type: 'group';
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Submenu type for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
775
|
+
* Unlike SubMenuType, this supports checkbox/switch items in children.
|
|
776
|
+
*/
|
|
777
|
+
interface BaseSubMenuType extends Omit<SubMenuType, 'children'> {
|
|
778
|
+
children?: BaseMenuItemType[];
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Base item union for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
782
|
+
*
|
|
783
|
+
* Note: This intentionally does NOT change `GenericItemType` itself,
|
|
784
|
+
* because `GenericItemType` maps to rc-menu/antd Menu item types.
|
|
785
|
+
*/
|
|
786
|
+
type BaseMenuItemType = MenuItemType | BaseSubMenuType | BaseMenuItemGroupType | MenuDividerType | MenuCheckboxItemType | MenuSwitchItemType | null;
|
|
787
|
+
|
|
788
|
+
declare const Menu: react.NamedExoticComponent<MenuProps<unknown>>;
|
|
789
|
+
|
|
790
|
+
type IconSpaceMode = 'global' | 'group';
|
|
791
|
+
interface RenderOptions {
|
|
792
|
+
iconSpaceMode?: IconSpaceMode;
|
|
793
|
+
indicatorOnRight?: boolean;
|
|
794
|
+
reserveIconSpace?: boolean;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
declare const renderDropdownMenuItems: (items: DropdownItem[], keyPath?: string[], options?: RenderOptions) => ReactNode[];
|
|
798
|
+
|
|
799
|
+
type DropdownMenuPlacement = Placement;
|
|
800
|
+
type DropdownMenuCheckboxItem = MenuCheckboxItemType;
|
|
801
|
+
type DropdownItem = BaseMenuItemType;
|
|
802
|
+
interface DropdownMenuProps<Payload = unknown> extends Omit<MenuRootProps<Payload>, 'children'> {
|
|
803
|
+
children: ReactNode;
|
|
804
|
+
/**
|
|
805
|
+
* 图标空间保留模式
|
|
806
|
+
* - 'global': 当任何一个选项有图标时,所有 item 都保留图标位
|
|
807
|
+
* - 'group': 只有当一个分组中存在图标时,该分组才保留图标位
|
|
808
|
+
* @default 'global'
|
|
809
|
+
*/
|
|
810
|
+
iconSpaceMode?: IconSpaceMode;
|
|
811
|
+
items: DropdownItem[] | (() => DropdownItem[]);
|
|
812
|
+
nativeButton?: boolean;
|
|
813
|
+
placement?: DropdownMenuPlacement;
|
|
814
|
+
popupProps?: MenuPopupProps;
|
|
815
|
+
portalProps?: MenuPortalProps;
|
|
816
|
+
positionerProps?: MenuPositionerProps;
|
|
817
|
+
/**
|
|
818
|
+
* 触发方式
|
|
819
|
+
* @default 'click'
|
|
820
|
+
*/
|
|
821
|
+
trigger?: Trigger;
|
|
822
|
+
triggerProps?: Omit<MenuTriggerProps<Payload>, 'children'>;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
declare const DROPDOWN_MENU_CONTAINER_ATTR = "data-lobe-ui-dropdown-menu-container";
|
|
826
|
+
declare const DropdownMenuRoot: typeof Menu$1.Root;
|
|
827
|
+
declare const DropdownMenuSubmenuRoot: typeof Menu$1.SubmenuRoot;
|
|
828
|
+
declare const DropdownMenuCheckboxItemIndicator: react__default.ForwardRefExoticComponent<_base_ui_react_menu.MenuCheckboxItemIndicatorProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
829
|
+
type DropdownMenuTriggerProps = Omit<react__default.ComponentPropsWithRef<typeof Menu$1.Trigger>, 'children' | 'render'> & {
|
|
830
|
+
children: react__default.ReactNode;
|
|
831
|
+
};
|
|
832
|
+
declare const DropdownMenuTrigger: {
|
|
833
|
+
({ children, className, nativeButton, ref: refProp, ...rest }: DropdownMenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
834
|
+
displayName: string;
|
|
835
|
+
};
|
|
836
|
+
type DropdownMenuPortalProps = react__default.ComponentProps<typeof Menu$1.Portal> & {
|
|
837
|
+
/**
|
|
838
|
+
* When `container` is not provided, it uses a shared container created by `usePortalContainer`.
|
|
839
|
+
*/
|
|
840
|
+
container?: HTMLElement | null;
|
|
841
|
+
};
|
|
842
|
+
declare const DropdownMenuPortal: {
|
|
843
|
+
({ container, ...rest }: DropdownMenuPortalProps): react_jsx_runtime.JSX.Element;
|
|
844
|
+
displayName: string;
|
|
845
|
+
};
|
|
846
|
+
type DropdownMenuPositionerProps = react__default.ComponentProps<typeof Menu$1.Positioner> & {
|
|
847
|
+
hoverTrigger?: boolean;
|
|
848
|
+
placement?: DropdownMenuPlacement;
|
|
849
|
+
};
|
|
850
|
+
declare const DropdownMenuPositioner: {
|
|
851
|
+
({ className, placement, hoverTrigger, align, side, sideOffset, children, ...rest }: DropdownMenuPositionerProps): react_jsx_runtime.JSX.Element;
|
|
852
|
+
displayName: string;
|
|
853
|
+
};
|
|
854
|
+
type DropdownMenuPopupProps = react__default.ComponentProps<typeof Menu$1.Popup>;
|
|
855
|
+
declare const DropdownMenuPopup: {
|
|
856
|
+
({ className, ...rest }: DropdownMenuPopupProps): react_jsx_runtime.JSX.Element;
|
|
857
|
+
displayName: string;
|
|
858
|
+
};
|
|
859
|
+
type DropdownMenuItemProps = react__default.ComponentProps<typeof Menu$1.Item> & {
|
|
860
|
+
danger?: boolean;
|
|
861
|
+
};
|
|
862
|
+
declare const DropdownMenuItem: {
|
|
863
|
+
({ className, danger, ...rest }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
864
|
+
displayName: string;
|
|
865
|
+
};
|
|
866
|
+
type DropdownMenuCheckboxItemProps = react__default.ComponentProps<typeof Menu$1.CheckboxItem> & {
|
|
867
|
+
danger?: boolean;
|
|
868
|
+
};
|
|
869
|
+
declare const DropdownMenuCheckboxItemPrimitive: {
|
|
870
|
+
({ className, danger, ...rest }: DropdownMenuCheckboxItemProps): react_jsx_runtime.JSX.Element;
|
|
871
|
+
displayName: string;
|
|
872
|
+
};
|
|
873
|
+
type DropdownMenuSeparatorProps = react__default.ComponentProps<typeof Menu$1.Separator>;
|
|
874
|
+
declare const DropdownMenuSeparator: {
|
|
875
|
+
({ className, ...rest }: DropdownMenuSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
876
|
+
displayName: string;
|
|
877
|
+
};
|
|
878
|
+
declare const DropdownMenuGroup: react__default.ForwardRefExoticComponent<_base_ui_react_menu.MenuGroupProps & react__default.RefAttributes<Element>>;
|
|
879
|
+
type DropdownMenuGroupLabelProps = react__default.ComponentProps<typeof Menu$1.GroupLabel>;
|
|
880
|
+
declare const DropdownMenuGroupLabel: {
|
|
881
|
+
({ className, ...rest }: DropdownMenuGroupLabelProps): react_jsx_runtime.JSX.Element;
|
|
882
|
+
displayName: string;
|
|
883
|
+
};
|
|
884
|
+
type DropdownMenuSubmenuTriggerProps = react__default.ComponentProps<typeof Menu$1.SubmenuTrigger> & {
|
|
885
|
+
danger?: boolean;
|
|
886
|
+
};
|
|
887
|
+
declare const DropdownMenuSubmenuTrigger: {
|
|
888
|
+
({ className, danger, ...rest }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
889
|
+
displayName: string;
|
|
890
|
+
};
|
|
891
|
+
type DropdownMenuItemContentProps = react__default.HTMLAttributes<HTMLDivElement>;
|
|
892
|
+
declare const DropdownMenuItemContent: {
|
|
893
|
+
({ className, ...rest }: DropdownMenuItemContentProps): react_jsx_runtime.JSX.Element;
|
|
894
|
+
displayName: string;
|
|
895
|
+
};
|
|
896
|
+
type DropdownMenuItemIconProps = react__default.HTMLAttributes<HTMLSpanElement>;
|
|
897
|
+
declare const DropdownMenuItemIcon: {
|
|
898
|
+
({ className, ...rest }: DropdownMenuItemIconProps): react_jsx_runtime.JSX.Element;
|
|
899
|
+
displayName: string;
|
|
900
|
+
};
|
|
901
|
+
type DropdownMenuItemLabelProps = react__default.HTMLAttributes<HTMLSpanElement>;
|
|
902
|
+
declare const DropdownMenuItemLabel: {
|
|
903
|
+
({ className, ...rest }: DropdownMenuItemLabelProps): react_jsx_runtime.JSX.Element;
|
|
904
|
+
displayName: string;
|
|
905
|
+
};
|
|
906
|
+
type DropdownMenuItemExtraProps = react__default.HTMLAttributes<HTMLSpanElement>;
|
|
907
|
+
declare const DropdownMenuItemExtra: {
|
|
908
|
+
({ className, ...rest }: DropdownMenuItemExtraProps): react_jsx_runtime.JSX.Element;
|
|
909
|
+
displayName: string;
|
|
910
|
+
};
|
|
911
|
+
type DropdownMenuSubmenuArrowProps = react__default.HTMLAttributes<HTMLSpanElement>;
|
|
912
|
+
declare const DropdownMenuSubmenuArrow: {
|
|
913
|
+
({ className, ...rest }: DropdownMenuSubmenuArrowProps): react_jsx_runtime.JSX.Element;
|
|
914
|
+
displayName: string;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
declare const DropdownMenu: react.NamedExoticComponent<DropdownMenuProps<unknown>>;
|
|
918
|
+
|
|
919
|
+
type ActionIconGroupEvent = Pick<MenuInfo, 'key' | 'keyPath' | 'domEvent'>;
|
|
920
|
+
interface ActionIconGroupProps extends Omit<CenterProps, 'children'> {
|
|
921
|
+
actionIconProps?: Partial<Omit<ActionIconProps, 'icon' | 'size' | 'ref'>>;
|
|
922
|
+
disabled?: boolean;
|
|
923
|
+
glass?: boolean;
|
|
924
|
+
items?: MenuItemType[];
|
|
925
|
+
menu?: DropdownMenuProps['items'];
|
|
926
|
+
onActionClick?: (action: ActionIconGroupEvent) => void;
|
|
927
|
+
ref?: Ref<HTMLDivElement>;
|
|
928
|
+
shadow?: boolean;
|
|
929
|
+
size?: ActionIconProps['size'];
|
|
930
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
declare const ActionIconGroup: FC<ActionIconGroupProps>;
|
|
934
|
+
|
|
935
|
+
interface AlertProps extends Omit<AlertProps$1, 'icon' | 'type'> {
|
|
936
|
+
classNames?: {
|
|
937
|
+
alert?: string;
|
|
938
|
+
container?: string;
|
|
939
|
+
extraContent?: string;
|
|
940
|
+
};
|
|
941
|
+
colorfulText?: boolean;
|
|
942
|
+
extra?: ReactNode;
|
|
943
|
+
extraDefaultExpand?: boolean;
|
|
944
|
+
extraIsolate?: boolean;
|
|
945
|
+
glass?: boolean;
|
|
946
|
+
icon?: IconProps$1['icon'];
|
|
947
|
+
iconProps?: Omit<IconProps$1, 'icon'>;
|
|
948
|
+
ref?: Ref<AlertRef>;
|
|
949
|
+
styles?: {
|
|
950
|
+
alert?: CSSProperties;
|
|
951
|
+
container?: CSSProperties;
|
|
952
|
+
extraContent?: CSSProperties;
|
|
953
|
+
};
|
|
954
|
+
text?: {
|
|
955
|
+
detail?: string;
|
|
956
|
+
};
|
|
957
|
+
type?: 'success' | 'info' | 'warning' | 'error' | 'secondary';
|
|
958
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
declare const Alert: react.NamedExoticComponent<AlertProps>;
|
|
962
|
+
|
|
963
|
+
interface AutoCompleteProps extends AutoCompleteProps$1 {
|
|
964
|
+
shadow?: boolean;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
declare const AutoComplete: react.NamedExoticComponent<AutoCompleteProps>;
|
|
968
|
+
|
|
969
|
+
interface AvatarProps extends AvatarProps$1 {
|
|
970
|
+
animation?: boolean;
|
|
971
|
+
avatar?: string | ReactNode;
|
|
972
|
+
background?: string;
|
|
973
|
+
bordered?: boolean;
|
|
974
|
+
borderedColor?: string;
|
|
975
|
+
emojiScaleWithBackground?: boolean;
|
|
976
|
+
loading?: boolean;
|
|
977
|
+
ref?: Ref<HTMLDivElement>;
|
|
978
|
+
shadow?: boolean;
|
|
979
|
+
shape?: 'circle' | 'square';
|
|
980
|
+
size?: number;
|
|
981
|
+
sliceText?: boolean;
|
|
982
|
+
title?: string;
|
|
983
|
+
tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
|
|
984
|
+
unoptimized?: boolean;
|
|
985
|
+
variant?: 'borderless' | 'filled' | 'outlined';
|
|
986
|
+
}
|
|
987
|
+
interface AvatarGroupItemType extends Pick<AvatarProps, 'avatar' | 'title' | 'alt' | 'onClick' | 'style' | 'className' | 'loading'> {
|
|
988
|
+
key: string;
|
|
989
|
+
}
|
|
990
|
+
interface AvatarGroupProps extends Pick<AvatarProps, 'variant' | 'bordered' | 'shadow' | 'size' | 'background' | 'animation' | 'draggable' | 'shape'>, Omit<FlexboxProps, 'children' | 'onClick'> {
|
|
991
|
+
classNames?: {
|
|
992
|
+
avatar?: string;
|
|
993
|
+
count?: string;
|
|
994
|
+
};
|
|
995
|
+
items: AvatarGroupItemType[];
|
|
996
|
+
max?: number;
|
|
997
|
+
onClick?: (props: {
|
|
998
|
+
item: AvatarGroupItemType;
|
|
999
|
+
key: string;
|
|
1000
|
+
}) => void;
|
|
1001
|
+
ref?: Ref<HTMLDivElement>;
|
|
1002
|
+
styles?: {
|
|
1003
|
+
avatar?: CSSProperties;
|
|
1004
|
+
count?: CSSProperties;
|
|
1005
|
+
};
|
|
1006
|
+
zIndexReverse?: boolean;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
declare const AvatarGroup: react.NamedExoticComponent<AvatarGroupProps>;
|
|
1010
|
+
|
|
1011
|
+
interface IAvatar {
|
|
1012
|
+
(props: AvatarProps & RefAttributes<HTMLDivElement>): ReactNode;
|
|
1013
|
+
Group: typeof AvatarGroup;
|
|
1014
|
+
}
|
|
1015
|
+
declare const Avatar: IAvatar;
|
|
1016
|
+
|
|
1017
|
+
interface BurgerProps {
|
|
1018
|
+
className?: string;
|
|
1019
|
+
drawerProps?: Partial<Omit<DrawerProps$1, 'items' | 'opened' | 'setOpened'>>;
|
|
1020
|
+
fullscreen?: boolean;
|
|
1021
|
+
headerHeight?: number;
|
|
1022
|
+
iconProps?: Partial<ActionIconProps>;
|
|
1023
|
+
items: MenuProps$1['items'];
|
|
1024
|
+
onClick?: MenuProps$1['onClick'];
|
|
1025
|
+
openKeys?: MenuProps$1['openKeys'];
|
|
1026
|
+
opened: boolean;
|
|
1027
|
+
ref?: Ref<HTMLDivElement>;
|
|
1028
|
+
rootClassName?: string;
|
|
1029
|
+
selectedKeys?: MenuProps$1['selectedKeys'];
|
|
1030
|
+
setOpened: (state: boolean) => void;
|
|
1031
|
+
size?: ActionIconProps['size'];
|
|
1032
|
+
style?: CSSProperties;
|
|
1033
|
+
variant?: ActionIconProps['variant'];
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
declare const Burger: react.NamedExoticComponent<BurgerProps>;
|
|
1037
|
+
|
|
1038
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'icon'> {
|
|
1039
|
+
glass?: boolean;
|
|
1040
|
+
icon?: IconProps$1['icon'];
|
|
1041
|
+
iconProps?: Partial<Omit<IconProps$1, 'icon'>>;
|
|
1042
|
+
ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
1043
|
+
shadow?: boolean;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
declare const Button: FC<ButtonProps>;
|
|
1047
|
+
|
|
1048
|
+
interface TextProps extends DivProps$1 {
|
|
1049
|
+
align?: 'left' | 'center' | 'right';
|
|
1050
|
+
as?: ElementType;
|
|
1051
|
+
code?: boolean;
|
|
1052
|
+
color?: string;
|
|
1053
|
+
delete?: boolean;
|
|
1054
|
+
disabled?: boolean;
|
|
1055
|
+
ellipsis?: boolean | {
|
|
1056
|
+
rows?: number;
|
|
1057
|
+
tooltip?: boolean | string | TooltipProps;
|
|
1058
|
+
tooltipWhenOverflow?: boolean;
|
|
1059
|
+
};
|
|
1060
|
+
fontSize?: number | string;
|
|
1061
|
+
italic?: boolean;
|
|
1062
|
+
/**
|
|
1063
|
+
* Clamp lines with CSS line-clamp.
|
|
1064
|
+
*
|
|
1065
|
+
* Note: When `ellipsis` is provided, `ellipsis` takes precedence.
|
|
1066
|
+
*/
|
|
1067
|
+
lineClamp?: number;
|
|
1068
|
+
lineHeight?: CSSProperties['lineHeight'];
|
|
1069
|
+
mark?: boolean;
|
|
1070
|
+
/**
|
|
1071
|
+
* Whether to disable wrapping (set `white-space: nowrap`).
|
|
1072
|
+
*
|
|
1073
|
+
* Note: When multi-line ellipsis is enabled, it will be ignored.
|
|
1074
|
+
*/
|
|
1075
|
+
noWrap?: boolean;
|
|
1076
|
+
ref?: Ref<HTMLDivElement>;
|
|
1077
|
+
strong?: boolean;
|
|
1078
|
+
textDecoration?: CSSProperties['textDecoration'];
|
|
1079
|
+
textTransform?: CSSProperties['textTransform'];
|
|
1080
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
1081
|
+
underline?: boolean;
|
|
1082
|
+
weight?: 'bold' | 'bolder' | number;
|
|
1083
|
+
whiteSpace?: CSSProperties['whiteSpace'];
|
|
1084
|
+
wordBreak?: CSSProperties['wordBreak'];
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
declare const Text: FC<TextProps>;
|
|
1088
|
+
|
|
1089
|
+
interface CheckboxProps extends Omit<DivProps$1, 'onChange'> {
|
|
1090
|
+
backgroundColor?: string;
|
|
1091
|
+
checked?: boolean;
|
|
1092
|
+
classNames?: {
|
|
1093
|
+
checkbox?: string;
|
|
1094
|
+
text?: string;
|
|
1095
|
+
wrapper?: string;
|
|
1096
|
+
};
|
|
1097
|
+
defaultChecked?: boolean;
|
|
1098
|
+
disabled?: boolean;
|
|
1099
|
+
indeterminate?: boolean;
|
|
1100
|
+
onChange?: (checked: boolean) => void;
|
|
1101
|
+
shape?: 'square' | 'circle';
|
|
1102
|
+
size?: number;
|
|
1103
|
+
styles?: {
|
|
1104
|
+
checkbox?: CSSProperties;
|
|
1105
|
+
text?: CSSProperties;
|
|
1106
|
+
wrapper?: CSSProperties;
|
|
1107
|
+
};
|
|
1108
|
+
textProps?: Omit<TextProps, 'children' | 'className' | 'style'>;
|
|
1109
|
+
}
|
|
1110
|
+
interface CheckboxGroupOption {
|
|
1111
|
+
disabled?: boolean;
|
|
1112
|
+
label: ReactNode;
|
|
1113
|
+
value: string;
|
|
1114
|
+
}
|
|
1115
|
+
interface CheckboxGroupProps extends Omit<FlexboxProps, 'defaultValue' | 'onChange'> {
|
|
1116
|
+
defaultValue?: string[];
|
|
1117
|
+
disabled?: boolean;
|
|
1118
|
+
onChange?: (value: string[]) => void;
|
|
1119
|
+
options: string[] | CheckboxGroupOption[];
|
|
1120
|
+
shape?: 'square' | 'circle';
|
|
1121
|
+
size?: number;
|
|
1122
|
+
textProps?: Omit<TextProps, 'children' | 'className' | 'style'>;
|
|
1123
|
+
value?: string[];
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
declare const CheckboxGroup: FC<CheckboxGroupProps>;
|
|
1127
|
+
|
|
1128
|
+
interface ICheckbox {
|
|
1129
|
+
(props: CheckboxProps & RefAttributes<HTMLDivElement>): ReactNode;
|
|
1130
|
+
Group: typeof CheckboxGroup;
|
|
1131
|
+
}
|
|
1132
|
+
declare const Checkbox: ICheckbox;
|
|
1133
|
+
|
|
1134
|
+
type DiffViewMode = 'split' | 'unified';
|
|
1135
|
+
interface CodeDiffProps extends Omit<FlexboxProps, 'children'> {
|
|
1136
|
+
/**
|
|
1137
|
+
* Actions to render in the header
|
|
1138
|
+
*/
|
|
1139
|
+
actionsRender?: (props: {
|
|
1140
|
+
newContent: string;
|
|
1141
|
+
oldContent: string;
|
|
1142
|
+
originalNode: ReactNode;
|
|
1143
|
+
}) => ReactNode;
|
|
1144
|
+
/**
|
|
1145
|
+
* Custom class names for different parts
|
|
1146
|
+
*/
|
|
1147
|
+
classNames?: {
|
|
1148
|
+
body?: string;
|
|
1149
|
+
header?: string;
|
|
1150
|
+
};
|
|
1151
|
+
/**
|
|
1152
|
+
* Options for the diff component
|
|
1153
|
+
*/
|
|
1154
|
+
diffOptions?: FileDiffOptions<string>;
|
|
1155
|
+
/**
|
|
1156
|
+
* File name to display
|
|
1157
|
+
*/
|
|
1158
|
+
fileName?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Programming language for syntax highlighting
|
|
1161
|
+
*/
|
|
1162
|
+
language?: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* New content (after changes)
|
|
1165
|
+
*/
|
|
1166
|
+
newContent: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* Old content (before changes)
|
|
1169
|
+
*/
|
|
1170
|
+
oldContent: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* Whether to show file header
|
|
1173
|
+
* @default true
|
|
1174
|
+
*/
|
|
1175
|
+
showHeader?: boolean;
|
|
1176
|
+
/**
|
|
1177
|
+
* Custom styles for different parts
|
|
1178
|
+
*/
|
|
1179
|
+
styles?: {
|
|
1180
|
+
body?: CSSProperties;
|
|
1181
|
+
header?: CSSProperties;
|
|
1182
|
+
};
|
|
1183
|
+
/**
|
|
1184
|
+
* Visual variant
|
|
1185
|
+
* @default 'filled'
|
|
1186
|
+
*/
|
|
1187
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
1188
|
+
/**
|
|
1189
|
+
* View mode for diff display
|
|
1190
|
+
* @default 'split'
|
|
1191
|
+
*/
|
|
1192
|
+
viewMode?: DiffViewMode;
|
|
1193
|
+
}
|
|
1194
|
+
interface PatchDiffProps extends Omit<FlexboxProps, 'children'> {
|
|
1195
|
+
/**
|
|
1196
|
+
* Actions to render in the header
|
|
1197
|
+
*/
|
|
1198
|
+
actionsRender?: (props: {
|
|
1199
|
+
originalNode: ReactNode;
|
|
1200
|
+
patch: string;
|
|
1201
|
+
}) => ReactNode;
|
|
1202
|
+
/**
|
|
1203
|
+
* Custom class names for different parts
|
|
1204
|
+
*/
|
|
1205
|
+
classNames?: {
|
|
1206
|
+
body?: string;
|
|
1207
|
+
header?: string;
|
|
1208
|
+
};
|
|
1209
|
+
/**
|
|
1210
|
+
* Options for the diff component
|
|
1211
|
+
*/
|
|
1212
|
+
diffOptions?: FileDiffOptions<string>;
|
|
1213
|
+
/**
|
|
1214
|
+
* File name to display (optional, extracted from patch if not provided)
|
|
1215
|
+
*/
|
|
1216
|
+
fileName?: string;
|
|
1217
|
+
/**
|
|
1218
|
+
* Programming language for syntax highlighting
|
|
1219
|
+
*/
|
|
1220
|
+
language?: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Unified diff patch string
|
|
1223
|
+
*/
|
|
1224
|
+
patch: string;
|
|
1225
|
+
/**
|
|
1226
|
+
* Whether to show file header
|
|
1227
|
+
* @default true
|
|
1228
|
+
*/
|
|
1229
|
+
showHeader?: boolean;
|
|
1230
|
+
/**
|
|
1231
|
+
* Custom styles for different parts
|
|
1232
|
+
*/
|
|
1233
|
+
styles?: {
|
|
1234
|
+
body?: CSSProperties;
|
|
1235
|
+
header?: CSSProperties;
|
|
1236
|
+
};
|
|
1237
|
+
/**
|
|
1238
|
+
* Visual variant
|
|
1239
|
+
* @default 'filled'
|
|
1240
|
+
*/
|
|
1241
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
1242
|
+
/**
|
|
1243
|
+
* View mode for diff display
|
|
1244
|
+
* @default 'split'
|
|
1245
|
+
*/
|
|
1246
|
+
viewMode?: DiffViewMode;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
declare const CodeDiff: react.NamedExoticComponent<CodeDiffProps>;
|
|
1250
|
+
|
|
1251
|
+
declare const PatchDiff: react.NamedExoticComponent<PatchDiffProps>;
|
|
1252
|
+
|
|
1253
|
+
interface CodeEditorProps extends TextAreaProps$1, Pick<FlexboxProps, 'width' | 'height' | 'flex'> {
|
|
1254
|
+
classNames?: {
|
|
1255
|
+
highlight?: string;
|
|
1256
|
+
textarea?: string;
|
|
1257
|
+
};
|
|
1258
|
+
defaultValue?: string;
|
|
1259
|
+
language: string;
|
|
1260
|
+
onValueChange: (value: string) => void;
|
|
1261
|
+
placeholder?: string;
|
|
1262
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
1263
|
+
style?: CSSProperties;
|
|
1264
|
+
styles?: {
|
|
1265
|
+
highlight?: CSSProperties;
|
|
1266
|
+
textarea?: CSSProperties;
|
|
1267
|
+
};
|
|
1268
|
+
value: string;
|
|
1269
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
declare const CodeEditor: react.NamedExoticComponent<CodeEditorProps>;
|
|
1273
|
+
|
|
1274
|
+
interface CollapseItemType extends ItemType$1 {
|
|
1275
|
+
desc?: ReactNode;
|
|
1276
|
+
icon?: IconProps$1['icon'];
|
|
1277
|
+
}
|
|
1278
|
+
interface CollapseProps extends Omit<CollapseProps$1, 'collapsible' | 'ghost' | 'items'> {
|
|
1279
|
+
classNames?: {
|
|
1280
|
+
desc?: string;
|
|
1281
|
+
header?: string;
|
|
1282
|
+
title?: string;
|
|
1283
|
+
};
|
|
1284
|
+
collapsible?: boolean;
|
|
1285
|
+
gap?: number;
|
|
1286
|
+
items: CollapseItemType[];
|
|
1287
|
+
padding?: number | string | {
|
|
1288
|
+
body?: number | string;
|
|
1289
|
+
header?: number | string;
|
|
1290
|
+
};
|
|
1291
|
+
ref?: Ref<HTMLDivElement>;
|
|
1292
|
+
styles?: {
|
|
1293
|
+
desc?: CSSProperties;
|
|
1294
|
+
header?: CSSProperties;
|
|
1295
|
+
title?: CSSProperties;
|
|
1296
|
+
};
|
|
1297
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
declare const Collapse: react.NamedExoticComponent<CollapseProps>;
|
|
1301
|
+
|
|
1302
|
+
interface ColorSwatchesItemType {
|
|
1303
|
+
color: string;
|
|
1304
|
+
key?: Key;
|
|
1305
|
+
title?: ReactNode;
|
|
1306
|
+
}
|
|
1307
|
+
interface ColorSwatchesProps extends Omit<FlexboxProps, 'onChange'> {
|
|
1308
|
+
colors: ColorSwatchesItemType[];
|
|
1309
|
+
defaultValue?: string;
|
|
1310
|
+
enableColorPicker?: boolean;
|
|
1311
|
+
enableColorSwatches?: boolean;
|
|
1312
|
+
onChange?: (color?: string) => void;
|
|
1313
|
+
ref?: Ref<HTMLDivElement>;
|
|
1314
|
+
shape?: 'circle' | 'square';
|
|
1315
|
+
size?: number;
|
|
1316
|
+
texts?: {
|
|
1317
|
+
custom: string;
|
|
1318
|
+
presets: string;
|
|
1319
|
+
};
|
|
1320
|
+
value?: string;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
declare const ColorSwatches: FC<ColorSwatchesProps>;
|
|
1324
|
+
|
|
1325
|
+
type MotionComponentType = typeof motion_react.motion | typeof m;
|
|
1326
|
+
declare const MotionComponent: Context<MotionComponentType>;
|
|
1327
|
+
declare const MotionProvider: react.NamedExoticComponent<{
|
|
1328
|
+
children: ReactNode;
|
|
1329
|
+
motion: MotionComponentType;
|
|
1330
|
+
}>;
|
|
1331
|
+
declare const useMotionComponent: () => MotionComponentType;
|
|
1332
|
+
|
|
1333
|
+
declare const _default$8: {
|
|
1334
|
+
readonly 'sideNav.collapse': "Collapse sidebar";
|
|
1335
|
+
readonly 'sideNav.demoActiveLabel': "Active";
|
|
1336
|
+
readonly 'sideNav.demoFeatureAutoCollapseDesc': "Drag below threshold for smart collapse";
|
|
1337
|
+
readonly 'sideNav.demoFeatureAutoCollapseTitle': "Auto-collapse";
|
|
1338
|
+
readonly 'sideNav.demoFeaturePerformanceDesc': "No animation overhead for better performance";
|
|
1339
|
+
readonly 'sideNav.demoFeaturePerformanceTitle': "Performance";
|
|
1340
|
+
readonly 'sideNav.demoFeatureResizeDesc': "Drag to adjust panel width";
|
|
1341
|
+
readonly 'sideNav.demoFeatureResizeTitle': "Flexible Resize";
|
|
1342
|
+
readonly 'sideNav.demoFeatureSmartHandleDesc': "Hover to reveal toggle button";
|
|
1343
|
+
readonly 'sideNav.demoFeatureSmartHandleTitle': "Smart Handle";
|
|
1344
|
+
readonly 'sideNav.demoFeaturesTitle': "Features";
|
|
1345
|
+
readonly 'sideNav.demoHint': "Try dragging the panel edge and using the toggle button ->";
|
|
1346
|
+
readonly 'sideNav.demoSubtitle': "A workspace-style side panel with draggable resize";
|
|
1347
|
+
readonly 'sideNav.demoTitle': "DraggableSideNav Demo";
|
|
1348
|
+
readonly 'sideNav.expand': "Expand sidebar";
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
declare const _default$7: {
|
|
1352
|
+
readonly 'messageModal.cancel': "Cancel";
|
|
1353
|
+
readonly 'messageModal.confirm': "Confirm";
|
|
1354
|
+
readonly 'messageModal.edit': "Edit";
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
declare const _default$6: {
|
|
1358
|
+
readonly 'hotkey.conflict': "This shortcut conflicts with an existing one.";
|
|
1359
|
+
readonly 'hotkey.invalidCombination': "Shortcut must include a modifier key (Ctrl, Alt, Shift) and only one regular key.";
|
|
1360
|
+
readonly 'hotkey.placeholder': "Press keys to record shortcut";
|
|
1361
|
+
readonly 'hotkey.reset': "Reset to default";
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
declare const _default$5: {
|
|
1365
|
+
readonly 'form.reset': "Reset";
|
|
1366
|
+
readonly 'form.submit': "Submit";
|
|
1367
|
+
readonly 'form.unsavedChanges': "Unsaved changes";
|
|
1368
|
+
readonly 'form.unsavedWarning': "You have unsaved changes. Are you sure you want to leave?";
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
declare const _default$4: {
|
|
1372
|
+
readonly 'emojiPicker.delete': "Delete";
|
|
1373
|
+
readonly 'emojiPicker.draggerDesc': "Click or Drag image to this area to upload";
|
|
1374
|
+
readonly 'emojiPicker.emoji': "Emoji";
|
|
1375
|
+
readonly 'emojiPicker.fileTypeError': "You can only upload image file!";
|
|
1376
|
+
readonly 'emojiPicker.upload': "Upload";
|
|
1377
|
+
readonly 'emojiPicker.uploadBtn': "Crop and Upload";
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
declare const _default$3: {
|
|
1381
|
+
readonly 'editableMessage.addProps': "Add Props";
|
|
1382
|
+
readonly 'editableMessage.delete': "Delete";
|
|
1383
|
+
readonly 'editableMessage.input': "Input";
|
|
1384
|
+
readonly 'editableMessage.inputPlaceholder': "Please enter sample input content";
|
|
1385
|
+
readonly 'editableMessage.output': "Output";
|
|
1386
|
+
readonly 'editableMessage.outputPlaceholder': "Please enter sample output content";
|
|
1387
|
+
readonly 'editableMessage.system': "System";
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
declare const _default$2: {
|
|
1391
|
+
readonly 'common.cancel': "Cancel";
|
|
1392
|
+
readonly 'common.confirm': "Confirm";
|
|
1393
|
+
readonly 'common.delete': "Delete";
|
|
1394
|
+
readonly 'common.edit': "Edit";
|
|
1395
|
+
readonly 'common.empty': "(empty)";
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
declare const _default$1: {
|
|
1399
|
+
readonly 'chat.avatar': "avatar";
|
|
1400
|
+
readonly 'chat.placeholder': "...";
|
|
1401
|
+
readonly 'tokenTag.overload': "Overload";
|
|
1402
|
+
readonly 'tokenTag.remained': "Remained";
|
|
1403
|
+
readonly 'tokenTag.used': "Used";
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
type BuiltinTranslationResources = typeof _default$1 & typeof _default$2 & typeof _default$3 & typeof _default$4 & typeof _default$5 & typeof _default$6 & typeof _default$7 & typeof _default$8;
|
|
1407
|
+
type TranslationKey = keyof BuiltinTranslationResources;
|
|
1408
|
+
type TranslationValue = string;
|
|
1409
|
+
/**
|
|
1410
|
+
* A (partial) dictionary of translations.
|
|
1411
|
+
*
|
|
1412
|
+
* Note: it's intentionally Partial so feature-level modules can pass only their own keys as
|
|
1413
|
+
* fallback resources (e.g. `useTranslation(editableMessageMessages)`).
|
|
1414
|
+
*/
|
|
1415
|
+
type TranslationResources = Partial<Record<TranslationKey, TranslationValue>>;
|
|
1416
|
+
type TranslationResourcesMap = TranslationResources[] | Record<string, TranslationResources>;
|
|
1417
|
+
type TranslationResourcesInput = TranslationResourcesMap | Promise<TranslationResourcesMap>;
|
|
1418
|
+
|
|
1419
|
+
type CDN = 'aliyun' | 'unpkg';
|
|
1420
|
+
interface CdnApi {
|
|
1421
|
+
path: string;
|
|
1422
|
+
pkg: string;
|
|
1423
|
+
proxy?: CDN;
|
|
1424
|
+
version?: string;
|
|
1425
|
+
}
|
|
1426
|
+
declare const genCdnUrl: ({ pkg, version, path, proxy }: CdnApi) => string;
|
|
1427
|
+
|
|
1428
|
+
interface Config {
|
|
1429
|
+
aAs?: ElementType;
|
|
1430
|
+
customCdnFn?: CdnFn;
|
|
1431
|
+
imgAs?: ElementType;
|
|
1432
|
+
imgUnoptimized?: boolean;
|
|
1433
|
+
proxy?: CDN | 'custom';
|
|
1434
|
+
}
|
|
1435
|
+
interface ConfigProviderProps {
|
|
1436
|
+
children: ReactNode;
|
|
1437
|
+
config?: Config;
|
|
1438
|
+
locale?: string;
|
|
1439
|
+
motion: MotionComponentType;
|
|
1440
|
+
resources?: TranslationResourcesInput;
|
|
1441
|
+
}
|
|
1442
|
+
declare const ConfigProvider: react.NamedExoticComponent<ConfigProviderProps>;
|
|
1443
|
+
type CdnFn = ({ pkg, version, path }: CdnApi) => string;
|
|
1444
|
+
declare const useCdnFn: () => CdnFn;
|
|
1445
|
+
|
|
1446
|
+
type ContextMenuCheckboxItem = MenuCheckboxItemType;
|
|
1447
|
+
type ContextMenuItem = BaseMenuItemType;
|
|
1448
|
+
|
|
1449
|
+
type ContextMenuTriggerProps = {
|
|
1450
|
+
children: ReactNode;
|
|
1451
|
+
/**
|
|
1452
|
+
* Menu items to display. Supports lazy rendering via function.
|
|
1453
|
+
* When provided, context menu will be automatically shown on right-click.
|
|
1454
|
+
*/
|
|
1455
|
+
items?: ContextMenuItem[] | (() => ContextMenuItem[]);
|
|
1456
|
+
/**
|
|
1457
|
+
* Custom context menu handler. If `items` is provided, this is optional.
|
|
1458
|
+
*/
|
|
1459
|
+
onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
|
|
1460
|
+
} & Omit<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'children'>;
|
|
1461
|
+
declare const ContextMenuTrigger: react__default.NamedExoticComponent<ContextMenuTriggerProps>;
|
|
1462
|
+
|
|
1463
|
+
declare const ContextMenuHost: react.MemoExoticComponent<() => react_jsx_runtime.JSX.Element | null>;
|
|
1464
|
+
|
|
1465
|
+
interface ShowContextMenuOptions {
|
|
1466
|
+
iconSpaceMode?: IconSpaceMode;
|
|
1467
|
+
}
|
|
1468
|
+
declare const showContextMenu: (items: ContextMenuItem[], options?: ShowContextMenuOptions) => void;
|
|
1469
|
+
/**
|
|
1470
|
+
* Update menu items while keeping current anchor/position.
|
|
1471
|
+
* Useful for interactive menu items (e.g. checkbox) to avoid re-positioning.
|
|
1472
|
+
*/
|
|
1473
|
+
declare const updateContextMenuItems: (items: ContextMenuItem[]) => void;
|
|
1474
|
+
declare const closeContextMenu: () => void;
|
|
1475
|
+
|
|
1476
|
+
interface CopyButtonProps extends Omit<ActionIconProps, 'content'> {
|
|
1477
|
+
content: string | (() => string);
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
declare const CopyButton: react.NamedExoticComponent<CopyButtonProps>;
|
|
1481
|
+
|
|
1482
|
+
interface DatePickerProps extends DatePickerProps$1 {
|
|
1483
|
+
shadow?: boolean;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
declare const DatePicker: react.NamedExoticComponent<DatePickerProps>;
|
|
1487
|
+
|
|
1488
|
+
interface DownloadButtonProps extends ActionIconProps {
|
|
1489
|
+
blobUrl?: string;
|
|
1490
|
+
fileName?: string;
|
|
1491
|
+
fileType?: string;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
declare const DownloadButton: react__default.NamedExoticComponent<DownloadButtonProps>;
|
|
1495
|
+
|
|
1496
|
+
type DraggablePanelBodyProps = DivProps$1;
|
|
1497
|
+
declare const DraggablePanelBody: react.NamedExoticComponent<DivProps$1>;
|
|
1498
|
+
|
|
1499
|
+
type DraggablePanelContainerProps = DivProps$1;
|
|
1500
|
+
declare const DraggablePanelContainer: react.NamedExoticComponent<DivProps$1>;
|
|
1501
|
+
|
|
1502
|
+
type DraggablePanelFooterProps = DivProps$1;
|
|
1503
|
+
declare const DraggablePanelFooter: react.NamedExoticComponent<DivProps$1>;
|
|
1504
|
+
|
|
1505
|
+
interface DraggablePanelHeaderProps extends Omit<DivProps$1, 'children'> {
|
|
1506
|
+
pin?: boolean;
|
|
1507
|
+
position?: 'left' | 'right';
|
|
1508
|
+
setExpand?: (expand: boolean) => void;
|
|
1509
|
+
setPin?: (pin: boolean) => void;
|
|
1510
|
+
title?: string;
|
|
1511
|
+
}
|
|
1512
|
+
declare const DraggablePanelHeader: react.NamedExoticComponent<DraggablePanelHeaderProps>;
|
|
1513
|
+
|
|
1514
|
+
type PlacementType = 'right' | 'left' | 'top' | 'bottom';
|
|
1515
|
+
interface DraggablePanelProps extends DivProps$1 {
|
|
1516
|
+
backgroundColor?: string;
|
|
1517
|
+
classNames?: {
|
|
1518
|
+
content?: string;
|
|
1519
|
+
handle?: string;
|
|
1520
|
+
};
|
|
1521
|
+
defaultExpand?: boolean;
|
|
1522
|
+
defaultSize?: Partial<Size>;
|
|
1523
|
+
destroyOnClose?: boolean;
|
|
1524
|
+
expand?: boolean;
|
|
1525
|
+
expandable?: boolean;
|
|
1526
|
+
fullscreen?: boolean;
|
|
1527
|
+
headerHeight?: number;
|
|
1528
|
+
maxHeight?: number;
|
|
1529
|
+
maxWidth?: number;
|
|
1530
|
+
minHeight?: number;
|
|
1531
|
+
minWidth?: number;
|
|
1532
|
+
mode?: 'fixed' | 'float';
|
|
1533
|
+
onExpandChange?: (expand: boolean) => void;
|
|
1534
|
+
onSizeChange?: (delta: NumberSize, size?: Size) => void;
|
|
1535
|
+
onSizeDragging?: (delta: NumberSize, size?: Size) => void;
|
|
1536
|
+
pin?: boolean;
|
|
1537
|
+
placement: PlacementType;
|
|
1538
|
+
resize?: Props$1['enableResizing'];
|
|
1539
|
+
/**
|
|
1540
|
+
* Whether to show border
|
|
1541
|
+
* @default true
|
|
1542
|
+
*/
|
|
1543
|
+
showBorder?: boolean;
|
|
1544
|
+
showHandleHighlight?: boolean;
|
|
1545
|
+
showHandleWhenCollapsed?: boolean;
|
|
1546
|
+
showHandleWideArea?: boolean;
|
|
1547
|
+
size?: Partial<Size>;
|
|
1548
|
+
styles?: {
|
|
1549
|
+
content?: CSSProperties;
|
|
1550
|
+
handle?: CSSProperties;
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
interface IDraggablePanel {
|
|
1555
|
+
(props: DraggablePanelProps & RefAttributes<HTMLDivElement>): ReactNode;
|
|
1556
|
+
Body: typeof DraggablePanelBody;
|
|
1557
|
+
Container: typeof DraggablePanelContainer;
|
|
1558
|
+
Footer: typeof DraggablePanelFooter;
|
|
1559
|
+
Header: typeof DraggablePanelHeader;
|
|
1560
|
+
}
|
|
1561
|
+
declare const DraggablePanel: IDraggablePanel;
|
|
1562
|
+
|
|
1563
|
+
interface DraggableSideNavProps extends Omit<DivProps$1, 'children' | 'onSelect'> {
|
|
1564
|
+
backgroundColor?: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* Body content (main content area)
|
|
1567
|
+
* Function that receives expand state
|
|
1568
|
+
*/
|
|
1569
|
+
body: (expand: boolean) => ReactNode;
|
|
1570
|
+
/**
|
|
1571
|
+
* Classnames for internal components
|
|
1572
|
+
*/
|
|
1573
|
+
classNames?: {
|
|
1574
|
+
body?: string;
|
|
1575
|
+
container?: string;
|
|
1576
|
+
content?: string;
|
|
1577
|
+
footer?: string;
|
|
1578
|
+
handle?: string;
|
|
1579
|
+
header?: string;
|
|
1580
|
+
};
|
|
1581
|
+
/**
|
|
1582
|
+
* Whether the panel is expanded by default
|
|
1583
|
+
* @default true
|
|
1584
|
+
*/
|
|
1585
|
+
defaultExpand?: boolean;
|
|
1586
|
+
/**
|
|
1587
|
+
* Default width (number format)
|
|
1588
|
+
*/
|
|
1589
|
+
defaultWidth?: number;
|
|
1590
|
+
/**
|
|
1591
|
+
* Whether the panel is expanded (controlled)
|
|
1592
|
+
*/
|
|
1593
|
+
expand?: boolean;
|
|
1594
|
+
/**
|
|
1595
|
+
* Whether the panel can be expanded/collapsed
|
|
1596
|
+
* @default true
|
|
1597
|
+
*/
|
|
1598
|
+
expandable?: boolean;
|
|
1599
|
+
/**
|
|
1600
|
+
* Footer content
|
|
1601
|
+
* Can be a static element or a function that receives expand state
|
|
1602
|
+
*/
|
|
1603
|
+
footer?: ReactNode | ((expand: boolean) => ReactNode);
|
|
1604
|
+
/**
|
|
1605
|
+
* Header content
|
|
1606
|
+
* Can be a static element or a function that receives expand state
|
|
1607
|
+
*/
|
|
1608
|
+
header?: ReactNode | ((expand: boolean) => ReactNode);
|
|
1609
|
+
/**
|
|
1610
|
+
* Maximum width
|
|
1611
|
+
*/
|
|
1612
|
+
maxWidth?: number;
|
|
1613
|
+
/**
|
|
1614
|
+
* Minimum width when expanded (does not affect collapsed width which is always 64px)
|
|
1615
|
+
* Only applies when the panel is in expanded state
|
|
1616
|
+
* @default 64
|
|
1617
|
+
*/
|
|
1618
|
+
minWidth?: number;
|
|
1619
|
+
/**
|
|
1620
|
+
* Callback when expand state changes
|
|
1621
|
+
*/
|
|
1622
|
+
onExpandChange?: (expand: boolean) => void;
|
|
1623
|
+
/**
|
|
1624
|
+
* Callback when menu item is selected
|
|
1625
|
+
*/
|
|
1626
|
+
onSelect?: (key: string) => void;
|
|
1627
|
+
/**
|
|
1628
|
+
* Callback when width changes
|
|
1629
|
+
*/
|
|
1630
|
+
onWidthChange?: (delta: NumberSize, width: number) => void;
|
|
1631
|
+
/**
|
|
1632
|
+
* Callback when actively resizing width
|
|
1633
|
+
*/
|
|
1634
|
+
onWidthDragging?: (delta: NumberSize, width: number) => void;
|
|
1635
|
+
/**
|
|
1636
|
+
* Placement of the side nav
|
|
1637
|
+
* @default 'left'
|
|
1638
|
+
*/
|
|
1639
|
+
placement?: 'left' | 'right';
|
|
1640
|
+
/**
|
|
1641
|
+
* Whether to enable resizing
|
|
1642
|
+
* @default true
|
|
1643
|
+
*/
|
|
1644
|
+
resizable?: boolean;
|
|
1645
|
+
/**
|
|
1646
|
+
* Whether to show border
|
|
1647
|
+
* @default true
|
|
1648
|
+
*/
|
|
1649
|
+
showBorder?: boolean;
|
|
1650
|
+
/**
|
|
1651
|
+
* Whether to show handle for toggling
|
|
1652
|
+
* @default true
|
|
1653
|
+
*/
|
|
1654
|
+
showHandle?: boolean;
|
|
1655
|
+
showHandleHighlight?: boolean;
|
|
1656
|
+
/**
|
|
1657
|
+
* Whether to show handle when collapsed
|
|
1658
|
+
* @default false
|
|
1659
|
+
*/
|
|
1660
|
+
showHandleWhenCollapsed?: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* Custom styles
|
|
1663
|
+
*/
|
|
1664
|
+
styles?: {
|
|
1665
|
+
body?: CSSProperties;
|
|
1666
|
+
container?: CSSProperties;
|
|
1667
|
+
content?: CSSProperties;
|
|
1668
|
+
footer?: CSSProperties;
|
|
1669
|
+
handle?: CSSProperties;
|
|
1670
|
+
header?: CSSProperties;
|
|
1671
|
+
};
|
|
1672
|
+
/**
|
|
1673
|
+
* Expanded width (controlled)
|
|
1674
|
+
* This represents the width when expanded, not the current displayed width
|
|
1675
|
+
* The actual displayed width will be `width` when expanded, or `minWidth` when collapsed
|
|
1676
|
+
*/
|
|
1677
|
+
width?: number;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
declare const DraggableSideNav: react.NamedExoticComponent<DraggableSideNavProps>;
|
|
1681
|
+
|
|
1682
|
+
interface DrawerProps extends Omit<DrawerProps$1, 'styles' | 'classNames'> {
|
|
1683
|
+
classNames?: DrawerProps$1['classNames'] & {
|
|
1684
|
+
bodyContent?: string;
|
|
1685
|
+
extra?: string;
|
|
1686
|
+
sidebar?: string;
|
|
1687
|
+
sidebarContent?: string;
|
|
1688
|
+
title?: string;
|
|
1689
|
+
};
|
|
1690
|
+
closeIconProps?: ActionIconProps;
|
|
1691
|
+
containerMaxWidth?: number | string;
|
|
1692
|
+
noHeader?: boolean;
|
|
1693
|
+
ref?: Ref<HTMLDivElement>;
|
|
1694
|
+
sidebar?: ReactNode;
|
|
1695
|
+
sidebarWidth?: number;
|
|
1696
|
+
styles?: DrawerProps$1['styles'] & {
|
|
1697
|
+
bodyContent?: CSSProperties;
|
|
1698
|
+
extra?: CSSProperties;
|
|
1699
|
+
sidebar?: CSSProperties;
|
|
1700
|
+
sidebarContent?: CSSProperties;
|
|
1701
|
+
title?: CSSProperties;
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
declare const Drawer: react.NamedExoticComponent<DrawerProps>;
|
|
1706
|
+
|
|
1707
|
+
interface DropdownProps extends Omit<DropdownProps$1, 'menu'> {
|
|
1708
|
+
iconProps?: IconContentConfig;
|
|
1709
|
+
menu: MenuProps;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* @deprecated
|
|
1714
|
+
* Use `DropdownMenu` or `ContextMenu` instead
|
|
1715
|
+
* @see https://ui.lobehub.com/components/context-menu
|
|
1716
|
+
* @see https://ui.lobehub.com/components/dropdown-menu
|
|
1717
|
+
*/
|
|
1718
|
+
declare const Dropdown: react.NamedExoticComponent<DropdownProps>;
|
|
1719
|
+
|
|
1720
|
+
interface InputProps extends InputProps$1 {
|
|
1721
|
+
ref?: Ref<InputRef>;
|
|
1722
|
+
shadow?: boolean;
|
|
1723
|
+
}
|
|
1724
|
+
interface TextAreaProps extends TextAreaProps$2 {
|
|
1725
|
+
ref?: Ref<TextAreaRef>;
|
|
1726
|
+
resize?: boolean;
|
|
1727
|
+
shadow?: boolean;
|
|
1728
|
+
}
|
|
1729
|
+
interface InputNumberProps extends InputNumberProps$1 {
|
|
1730
|
+
ref?: Ref<InputNumberRef>;
|
|
1731
|
+
shadow?: boolean;
|
|
1732
|
+
}
|
|
1733
|
+
interface InputPasswordProps extends PasswordProps {
|
|
1734
|
+
ref?: Ref<InputRef>;
|
|
1735
|
+
shadow?: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
interface InputOPTProps extends OTPProps {
|
|
1738
|
+
ref?: Ref<OTPRef>;
|
|
1739
|
+
shadow?: boolean;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
declare const Input: react.NamedExoticComponent<InputProps>;
|
|
1743
|
+
|
|
1744
|
+
declare const InputNumber: react.NamedExoticComponent<InputNumberProps>;
|
|
1745
|
+
|
|
1746
|
+
declare const InputOPT: react.NamedExoticComponent<InputOPTProps>;
|
|
1747
|
+
|
|
1748
|
+
declare const InputPassword: react.NamedExoticComponent<InputPasswordProps>;
|
|
1749
|
+
|
|
1750
|
+
declare const TextArea: react.NamedExoticComponent<TextAreaProps>;
|
|
1751
|
+
|
|
1752
|
+
interface ControlInputProps extends Omit<InputProps, 'onChange' | 'value' | 'onAbort'> {
|
|
1753
|
+
onChange?: (value: string) => void;
|
|
1754
|
+
onChangeEnd?: (value: string) => void;
|
|
1755
|
+
onValueChanging?: (value: string) => void;
|
|
1756
|
+
submitIcon?: ActionIconProps['icon'];
|
|
1757
|
+
texts?: {
|
|
1758
|
+
reset?: string;
|
|
1759
|
+
submit?: string;
|
|
1760
|
+
};
|
|
1761
|
+
value?: string;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
interface EditableTextProps extends Omit<FlexboxProps, 'onChange' | 'onBlur' | 'onFocus'>, Pick<ControlInputProps, 'onChange' | 'value' | 'onChangeEnd' | 'onValueChanging' | 'texts' | 'variant' | 'onBlur' | 'onFocus' | 'size'> {
|
|
1765
|
+
className?: string;
|
|
1766
|
+
classNames?: {
|
|
1767
|
+
container?: string;
|
|
1768
|
+
input?: string;
|
|
1769
|
+
};
|
|
1770
|
+
editing?: boolean;
|
|
1771
|
+
inputProps?: Omit<ControlInputProps, 'onChange' | 'value' | 'onChangeEnd' | 'onValueChanging' | 'texts' | 'className' | 'style' | 'onBlur' | 'onFocus' | 'size'>;
|
|
1772
|
+
onEditingChange?: (editing: boolean) => void;
|
|
1773
|
+
showEditIcon?: boolean;
|
|
1774
|
+
style?: CSSProperties;
|
|
1775
|
+
styles?: {
|
|
1776
|
+
container?: CSSProperties;
|
|
1777
|
+
input?: CSSProperties;
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
declare const EditableText: react.NamedExoticComponent<EditableTextProps>;
|
|
1782
|
+
|
|
1783
|
+
declare const EditorSlashMenuList: react__default.ForwardRefExoticComponent<Omit<_base_ui_react_autocomplete.AutocompleteListProps & react__default.RefAttributes<HTMLDivElement>, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1784
|
+
type EditorSlashMenuPortalProps = react__default.ComponentProps<typeof Autocomplete.Portal> & {
|
|
1785
|
+
/**
|
|
1786
|
+
* When `container` is not provided, it uses a shared container created by `usePortalContainer`.
|
|
1787
|
+
*/
|
|
1788
|
+
container?: HTMLElement | null;
|
|
1789
|
+
};
|
|
1790
|
+
declare const EditorSlashMenuPortal: {
|
|
1791
|
+
({ container, ...rest }: EditorSlashMenuPortalProps): react_jsx_runtime.JSX.Element;
|
|
1792
|
+
displayName: string;
|
|
1793
|
+
};
|
|
1794
|
+
type EditorSlashMenuPositionerProps = react__default.ComponentProps<typeof Autocomplete.Positioner>;
|
|
1795
|
+
declare const EditorSlashMenuPositioner: {
|
|
1796
|
+
({ className, align, positionMethod, side, sideOffset, ...rest }: EditorSlashMenuPositionerProps): react_jsx_runtime.JSX.Element;
|
|
1797
|
+
displayName: string;
|
|
1798
|
+
};
|
|
1799
|
+
type EditorSlashMenuPopupProps = react__default.ComponentProps<typeof Autocomplete.Popup>;
|
|
1800
|
+
declare const EditorSlashMenuPopup: {
|
|
1801
|
+
({ className, initialFocus, ...rest }: EditorSlashMenuPopupProps): react_jsx_runtime.JSX.Element;
|
|
1802
|
+
displayName: string;
|
|
1803
|
+
};
|
|
1804
|
+
declare const EditorSlashMenuGroup$1: react__default.ForwardRefExoticComponent<_base_ui_react_autocomplete.AutocompleteGroupProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
1805
|
+
type EditorSlashMenuHiddenInputProps = react__default.ComponentProps<typeof Autocomplete.Input>;
|
|
1806
|
+
declare const EditorSlashMenuHiddenInput: {
|
|
1807
|
+
({ className, ...rest }: EditorSlashMenuHiddenInputProps): react_jsx_runtime.JSX.Element;
|
|
1808
|
+
displayName: string;
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
type EditorSlashMenuItemValue = string;
|
|
1812
|
+
type EditorSlashMenuOption = {
|
|
1813
|
+
/** Render danger style (red) */
|
|
1814
|
+
danger?: boolean;
|
|
1815
|
+
/** Whether the item is disabled */
|
|
1816
|
+
disabled?: boolean;
|
|
1817
|
+
/** Optional extra content shown at the end */
|
|
1818
|
+
extra?: react__default.ReactNode;
|
|
1819
|
+
/** Optional icon shown at the start */
|
|
1820
|
+
icon?: react__default.ReactNode;
|
|
1821
|
+
/** Optional additional keywords for filtering */
|
|
1822
|
+
keywords?: string[];
|
|
1823
|
+
/** Visible label, also used for filtering by default */
|
|
1824
|
+
label: string;
|
|
1825
|
+
/** Unique id of the command */
|
|
1826
|
+
value: EditorSlashMenuItemValue;
|
|
1827
|
+
};
|
|
1828
|
+
type EditorSlashMenuGroup = {
|
|
1829
|
+
items: EditorSlashMenuOption[];
|
|
1830
|
+
/** Optional group title */
|
|
1831
|
+
label?: string;
|
|
1832
|
+
};
|
|
1833
|
+
type EditorSlashMenuItems = Array<EditorSlashMenuOption | EditorSlashMenuGroup>;
|
|
1834
|
+
|
|
1835
|
+
type Props = {
|
|
1836
|
+
/** Anchor for positioning (caret virtual element, dom element, ref, etc.) */
|
|
1837
|
+
anchor?: react__default.ComponentProps<typeof EditorSlashMenuPositioner>['anchor'];
|
|
1838
|
+
defaultOpen?: boolean;
|
|
1839
|
+
/** Initial query string (uncontrolled) */
|
|
1840
|
+
defaultValue?: string;
|
|
1841
|
+
/** Optional custom empty state */
|
|
1842
|
+
empty?: react__default.ReactNode;
|
|
1843
|
+
hiddenInputProps?: react__default.ComponentProps<typeof EditorSlashMenuHiddenInput>;
|
|
1844
|
+
items: EditorSlashMenuItems;
|
|
1845
|
+
listProps?: react__default.ComponentProps<typeof EditorSlashMenuList>;
|
|
1846
|
+
onOpenChange?: (open: boolean, details: AutocompleteRootChangeEventDetails) => void;
|
|
1847
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
1848
|
+
/** Called when a command is selected. */
|
|
1849
|
+
onSelect?: (item: EditorSlashMenuOption, details: AutocompleteRootChangeEventDetails) => void;
|
|
1850
|
+
/** Called when query changes. By default, changes caused by item selection are ignored. */
|
|
1851
|
+
onValueChange?: (value: string, details: AutocompleteRootChangeEventDetails) => void;
|
|
1852
|
+
open?: boolean;
|
|
1853
|
+
popupProps?: react__default.ComponentProps<typeof EditorSlashMenuPopup>;
|
|
1854
|
+
portalProps?: Omit<react__default.ComponentProps<typeof EditorSlashMenuPortal>, 'container'> & {
|
|
1855
|
+
container?: HTMLElement | null;
|
|
1856
|
+
};
|
|
1857
|
+
positionerProps?: Omit<react__default.ComponentProps<typeof EditorSlashMenuPositioner>, 'anchor'>;
|
|
1858
|
+
/** Optional custom group label renderer */
|
|
1859
|
+
renderGroupLabel?: (label: string) => react__default.ReactNode;
|
|
1860
|
+
/** Optional custom item renderer */
|
|
1861
|
+
renderItem?: (item: EditorSlashMenuOption) => react__default.ReactNode;
|
|
1862
|
+
/** Reserve icon space even when icon is missing */
|
|
1863
|
+
reserveIconSpace?: boolean;
|
|
1864
|
+
/** Pass-through props */
|
|
1865
|
+
rootProps?: Omit<AutocompleteRootProps<EditorSlashMenuOption>, 'items' | 'value' | 'defaultValue' | 'onValueChange' | 'open' | 'defaultOpen' | 'onOpenChange' | 'onOpenChangeComplete' | 'itemToStringValue'>;
|
|
1866
|
+
/** Whether selecting an item should propagate its filled value via `onValueChange`. */
|
|
1867
|
+
updateValueOnSelect?: boolean;
|
|
1868
|
+
/** Current query string (controlled) */
|
|
1869
|
+
value?: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* Render a visually-hidden input element for keyboard navigation / screen readers.
|
|
1872
|
+
* Default is `false` because slash menus usually live inside an editor input.
|
|
1873
|
+
*/
|
|
1874
|
+
withHiddenInput?: boolean;
|
|
1875
|
+
};
|
|
1876
|
+
declare const EditorSlashMenu: react__default.NamedExoticComponent<Props>;
|
|
1877
|
+
|
|
1878
|
+
declare const PopoverArrowIcon: react_jsx_runtime.JSX.Element;
|
|
1879
|
+
|
|
1880
|
+
type PopoverPlacement = Placement;
|
|
1881
|
+
type PopoverTrigger = Trigger;
|
|
1882
|
+
/**
|
|
1883
|
+
* Base UI Positioner props that can be passed through
|
|
1884
|
+
*/
|
|
1885
|
+
type PopoverPositionerProps = Omit<PopoverPositionerProps$1, 'className' | 'style' | 'children'>;
|
|
1886
|
+
/**
|
|
1887
|
+
* Base UI Trigger props that can be passed through
|
|
1888
|
+
*/
|
|
1889
|
+
type PopoverTriggerComponentProps = Omit<PopoverTriggerProps, 'className' | 'style' | 'children' | 'render' | 'nativeButton' | 'handle' | 'payload'>;
|
|
1890
|
+
/**
|
|
1891
|
+
* Base UI Popup props that can be passed through
|
|
1892
|
+
*/
|
|
1893
|
+
type PopoverPopupProps = Omit<PopoverPopupProps$1, 'className' | 'style' | 'children'>;
|
|
1894
|
+
/**
|
|
1895
|
+
* Base UI Backdrop props that can be passed through
|
|
1896
|
+
*/
|
|
1897
|
+
type PopoverBackdropProps = Omit<PopoverBackdropProps$1, 'className' | 'style'>;
|
|
1898
|
+
/**
|
|
1899
|
+
* Base UI Portal props that can be passed through
|
|
1900
|
+
*/
|
|
1901
|
+
type PopoverPortalProps = Omit<PopoverPortalProps$1, 'children' | 'container'>;
|
|
1902
|
+
interface PopoverProps {
|
|
1903
|
+
/**
|
|
1904
|
+
* 是否显示箭头, 在 `inset` 下无法使用
|
|
1905
|
+
* @default false
|
|
1906
|
+
*/
|
|
1907
|
+
arrow?: boolean;
|
|
1908
|
+
/**
|
|
1909
|
+
* Base UI Backdrop 组件的 props
|
|
1910
|
+
*/
|
|
1911
|
+
backdropProps?: PopoverBackdropProps;
|
|
1912
|
+
/**
|
|
1913
|
+
* 触发元素
|
|
1914
|
+
*/
|
|
1915
|
+
children: ReactElement | ReactNode;
|
|
1916
|
+
/**
|
|
1917
|
+
* 弹出容器类名
|
|
1918
|
+
*/
|
|
1919
|
+
className?: string;
|
|
1920
|
+
/**
|
|
1921
|
+
* 自定义类名
|
|
1922
|
+
*/
|
|
1923
|
+
classNames?: {
|
|
1924
|
+
arrow?: string;
|
|
1925
|
+
content?: string;
|
|
1926
|
+
root?: string;
|
|
1927
|
+
trigger?: string;
|
|
1928
|
+
};
|
|
1929
|
+
/**
|
|
1930
|
+
* 关闭延迟(毫秒),优先级高于 mouseLeaveDelay
|
|
1931
|
+
*/
|
|
1932
|
+
closeDelay?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* 弹出内容
|
|
1935
|
+
*/
|
|
1936
|
+
content: ReactNode;
|
|
1937
|
+
/**
|
|
1938
|
+
* 默认打开状态
|
|
1939
|
+
* @default false
|
|
1940
|
+
*/
|
|
1941
|
+
defaultOpen?: boolean;
|
|
1942
|
+
/**
|
|
1943
|
+
* 是否禁用
|
|
1944
|
+
* @default false
|
|
1945
|
+
*/
|
|
1946
|
+
disabled?: boolean;
|
|
1947
|
+
/**
|
|
1948
|
+
* 获取弹出容器
|
|
1949
|
+
*/
|
|
1950
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
1951
|
+
/**
|
|
1952
|
+
* 是否嵌入 trigger 内部显示
|
|
1953
|
+
* @default false
|
|
1954
|
+
*/
|
|
1955
|
+
inset?: boolean;
|
|
1956
|
+
/**
|
|
1957
|
+
* 鼠标移入延迟(秒)
|
|
1958
|
+
* @default 0.1
|
|
1959
|
+
*/
|
|
1960
|
+
mouseEnterDelay?: number;
|
|
1961
|
+
/**
|
|
1962
|
+
* 鼠标移出延迟(秒)
|
|
1963
|
+
* @default 0.1
|
|
1964
|
+
*/
|
|
1965
|
+
mouseLeaveDelay?: number;
|
|
1966
|
+
/**
|
|
1967
|
+
* 是否使用原生 button 元素作为触发器
|
|
1968
|
+
*/
|
|
1969
|
+
nativeButton?: boolean;
|
|
1970
|
+
/**
|
|
1971
|
+
* 打开状态变化回调
|
|
1972
|
+
*/
|
|
1973
|
+
onOpenChange?: (open: boolean) => void;
|
|
1974
|
+
/**
|
|
1975
|
+
* 受控的打开状态
|
|
1976
|
+
*/
|
|
1977
|
+
open?: boolean;
|
|
1978
|
+
/**
|
|
1979
|
+
* 打开延迟(毫秒),优先级高于 mouseEnterDelay
|
|
1980
|
+
*/
|
|
1981
|
+
openDelay?: number;
|
|
1982
|
+
/**
|
|
1983
|
+
* 弹出位置
|
|
1984
|
+
* @default 'top'
|
|
1985
|
+
*/
|
|
1986
|
+
placement?: PopoverPlacement;
|
|
1987
|
+
/**
|
|
1988
|
+
* Base UI Popup 组件的 props
|
|
1989
|
+
*/
|
|
1990
|
+
popupProps?: PopoverPopupProps;
|
|
1991
|
+
/**
|
|
1992
|
+
* Base UI Portal 组件的 props
|
|
1993
|
+
*/
|
|
1994
|
+
portalProps?: PopoverPortalProps;
|
|
1995
|
+
/**
|
|
1996
|
+
* Base UI Positioner 组件的 props
|
|
1997
|
+
*/
|
|
1998
|
+
positionerProps?: PopoverPositionerProps;
|
|
1999
|
+
/**
|
|
2000
|
+
* ref
|
|
2001
|
+
*/
|
|
2002
|
+
ref?: ComponentPropsWithRef<typeof Popover$1.Trigger>['ref'];
|
|
2003
|
+
/**
|
|
2004
|
+
* 当设置为 true 时,即使在 PopoverGroup 内部也会独立渲染,忽略 group 单例行为
|
|
2005
|
+
*/
|
|
2006
|
+
standalone?: boolean;
|
|
2007
|
+
/**
|
|
2008
|
+
* 自定义样式
|
|
2009
|
+
*/
|
|
2010
|
+
styles?: {
|
|
2011
|
+
arrow?: CSSProperties;
|
|
2012
|
+
content?: CSSProperties;
|
|
2013
|
+
root?: CSSProperties;
|
|
2014
|
+
};
|
|
2015
|
+
/**
|
|
2016
|
+
* 触发方式
|
|
2017
|
+
* @default 'hover'
|
|
2018
|
+
*/
|
|
2019
|
+
trigger?: Trigger;
|
|
2020
|
+
/**
|
|
2021
|
+
* Base UI Trigger 组件的 props
|
|
2022
|
+
*/
|
|
2023
|
+
triggerProps?: PopoverTriggerComponentProps;
|
|
2024
|
+
/**
|
|
2025
|
+
* z-index
|
|
2026
|
+
*/
|
|
2027
|
+
zIndex?: number;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
declare const PopoverRoot: typeof Popover$1.Root;
|
|
2031
|
+
declare const PopoverBackdrop: react.ForwardRefExoticComponent<_base_ui_react_popover.PopoverBackdropProps & react.RefAttributes<HTMLDivElement>>;
|
|
2032
|
+
type PopoverTriggerElementProps = Omit<ComponentPropsWithRef<typeof Popover$1.Trigger>, 'children' | 'render'> & {
|
|
2033
|
+
children: ComponentProps<typeof Popover$1.Trigger>['children'];
|
|
2034
|
+
};
|
|
2035
|
+
declare const PopoverTriggerElement: {
|
|
2036
|
+
({ children, className, nativeButton, ref: refProp, ...rest }: PopoverTriggerElementProps): react_jsx_runtime.JSX.Element;
|
|
2037
|
+
displayName: string;
|
|
2038
|
+
};
|
|
2039
|
+
type PopoverPortalAtomProps = Omit<ComponentProps<typeof Popover$1.Portal>, 'container'> & {
|
|
2040
|
+
/**
|
|
2041
|
+
* Portal container. When not provided, it uses the shared container created by `usePopoverPortalContainer`.
|
|
2042
|
+
*/
|
|
2043
|
+
container?: HTMLElement | null;
|
|
2044
|
+
/**
|
|
2045
|
+
* Root element used by `usePopoverPortalContainer` to create the default container.
|
|
2046
|
+
*/
|
|
2047
|
+
root?: HTMLElement | ShadowRoot | null;
|
|
2048
|
+
};
|
|
2049
|
+
declare const PopoverPortal: {
|
|
2050
|
+
({ container, root, children, ...rest }: PopoverPortalAtomProps): react_jsx_runtime.JSX.Element | null;
|
|
2051
|
+
displayName: string;
|
|
2052
|
+
};
|
|
2053
|
+
type PopoverPositionerAtomProps = ComponentProps<typeof Popover$1.Positioner> & {
|
|
2054
|
+
hoverTrigger?: boolean;
|
|
2055
|
+
placement?: PopoverPlacement;
|
|
2056
|
+
};
|
|
2057
|
+
declare const PopoverPositioner: {
|
|
2058
|
+
({ children, className, hoverTrigger, placement, align, side, sideOffset, ...rest }: PopoverPositionerAtomProps): react_jsx_runtime.JSX.Element;
|
|
2059
|
+
displayName: string;
|
|
2060
|
+
};
|
|
2061
|
+
type PopoverPopupAtomProps = ComponentProps<typeof Popover$1.Popup>;
|
|
2062
|
+
declare const PopoverPopup: {
|
|
2063
|
+
({ className, ...rest }: PopoverPopupAtomProps): react_jsx_runtime.JSX.Element;
|
|
2064
|
+
displayName: string;
|
|
2065
|
+
};
|
|
2066
|
+
type PopoverArrowAtomProps = ComponentProps<typeof Popover$1.Arrow>;
|
|
2067
|
+
declare const PopoverArrow: {
|
|
2068
|
+
({ className, children, ...rest }: PopoverArrowAtomProps): react_jsx_runtime.JSX.Element;
|
|
2069
|
+
displayName: string;
|
|
2070
|
+
};
|
|
2071
|
+
type PopoverViewportAtomProps = ComponentProps<typeof Popover$1.Viewport>;
|
|
2072
|
+
declare const PopoverViewport: {
|
|
2073
|
+
({ className, ...rest }: PopoverViewportAtomProps): react_jsx_runtime.JSX.Element;
|
|
2074
|
+
displayName: string;
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
type PopoverContextValue = {
|
|
2078
|
+
close: () => void;
|
|
2079
|
+
};
|
|
2080
|
+
declare const PopoverProvider: react.NamedExoticComponent<{
|
|
2081
|
+
children: ReactNode;
|
|
2082
|
+
value: PopoverContextValue;
|
|
2083
|
+
}>;
|
|
2084
|
+
declare const usePopoverContext: () => PopoverContextValue;
|
|
2085
|
+
|
|
2086
|
+
declare const Popover: FC<PopoverProps>;
|
|
2087
|
+
|
|
2088
|
+
type PopoverGroupSharedProps = Omit<PopoverProps, 'children' | 'content' | 'defaultOpen' | 'open' | 'ref'> & {
|
|
2089
|
+
/**
|
|
2090
|
+
* @description Whether to enable content layout animation when switching triggers
|
|
2091
|
+
* @default false
|
|
2092
|
+
*/
|
|
2093
|
+
contentLayoutAnimation?: boolean;
|
|
2094
|
+
/**
|
|
2095
|
+
* Disable the "destroy on invalid trigger (display:none / disconnected)" guard for performance.
|
|
2096
|
+
* @default false
|
|
2097
|
+
*/
|
|
2098
|
+
disableDestroyOnInvalidTrigger?: boolean;
|
|
2099
|
+
/**
|
|
2100
|
+
* Disable the "hide when positioner falls back to (0,0)" visual guard for performance.
|
|
2101
|
+
* @default false
|
|
2102
|
+
*/
|
|
2103
|
+
disableZeroOriginGuard?: boolean;
|
|
2104
|
+
};
|
|
2105
|
+
|
|
2106
|
+
type PopoverGroupProps = PopoverGroupSharedProps & {
|
|
2107
|
+
children: ReactNode;
|
|
2108
|
+
};
|
|
2109
|
+
declare const PopoverGroup: FC<PopoverGroupProps>;
|
|
2110
|
+
|
|
2111
|
+
declare const POPOVER_CONTAINER_ATTR = "data-lobe-ui-popover-container";
|
|
2112
|
+
declare const usePopoverPortalContainer: (root?: HTMLElement | ShadowRoot | null) => HTMLElement | null;
|
|
2113
|
+
|
|
2114
|
+
interface AvatarUploaderProps {
|
|
2115
|
+
compressSize?: number;
|
|
2116
|
+
onChange: (avatar: string) => void;
|
|
2117
|
+
onUpload?: (file: File) => void;
|
|
2118
|
+
shape?: 'circle' | 'square';
|
|
2119
|
+
texts?: {
|
|
2120
|
+
draggerDesc?: string;
|
|
2121
|
+
fileTypeError?: string;
|
|
2122
|
+
uploadBtn?: string;
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
interface EmojiPickerCustomEmoji {
|
|
2126
|
+
emojis: [
|
|
2127
|
+
{
|
|
2128
|
+
id: string;
|
|
2129
|
+
keywords?: string[];
|
|
2130
|
+
name: string;
|
|
2131
|
+
skins: {
|
|
2132
|
+
src: string;
|
|
2133
|
+
}[];
|
|
2134
|
+
}
|
|
2135
|
+
];
|
|
2136
|
+
id: string;
|
|
2137
|
+
name: string;
|
|
2138
|
+
}
|
|
2139
|
+
interface EmojiPickerCustomTab {
|
|
2140
|
+
label: ReactNode;
|
|
2141
|
+
render: (handleAvatarChange: (avatar: string) => void) => ReactNode;
|
|
2142
|
+
value: string;
|
|
2143
|
+
}
|
|
2144
|
+
interface EmojiPickerProps extends Omit<AvatarProps, 'onChange' | 'avatar'> {
|
|
2145
|
+
allowDelete?: boolean;
|
|
2146
|
+
allowUpload?: boolean | {
|
|
2147
|
+
enableEmoji?: boolean;
|
|
2148
|
+
};
|
|
2149
|
+
compressSize?: number;
|
|
2150
|
+
contentProps?: Omit<FlexboxProps, 'className' | 'ref' | 'style'>;
|
|
2151
|
+
customEmojis?: EmojiPickerCustomEmoji[];
|
|
2152
|
+
customRender?: (avatar: string) => ReactNode;
|
|
2153
|
+
customTabs?: EmojiPickerCustomTab[];
|
|
2154
|
+
defaultAvatar?: string;
|
|
2155
|
+
defaultOpen?: boolean;
|
|
2156
|
+
loading?: boolean;
|
|
2157
|
+
locale?: string;
|
|
2158
|
+
onChange?: (emoji: string) => void;
|
|
2159
|
+
onDelete?: () => void;
|
|
2160
|
+
onOpenChange?: (open: boolean) => void;
|
|
2161
|
+
onUpload?: AvatarUploaderProps['onUpload'];
|
|
2162
|
+
open?: boolean;
|
|
2163
|
+
popupClassName?: string;
|
|
2164
|
+
popupProps?: Omit<PopoverProps, 'onOpenChange' | 'defaultOpen' | 'content' | 'open' | 'trigger' | 'children'>;
|
|
2165
|
+
popupStyle?: CSSProperties;
|
|
2166
|
+
size?: number;
|
|
2167
|
+
texts?: AvatarUploaderProps['texts'] & {
|
|
2168
|
+
delete?: string;
|
|
2169
|
+
emoji?: string;
|
|
2170
|
+
upload?: string;
|
|
2171
|
+
};
|
|
2172
|
+
value?: string;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
declare const EmojiPicker: react.NamedExoticComponent<EmojiPickerProps>;
|
|
2176
|
+
|
|
2177
|
+
interface EmptyProps extends Omit<FlexboxProps, 'title'> {
|
|
2178
|
+
action?: ReactNode;
|
|
2179
|
+
actionProps?: Omit<FlexboxProps, 'children'>;
|
|
2180
|
+
description?: ReactNode;
|
|
2181
|
+
descriptionProps?: Omit<TextProps, 'children'>;
|
|
2182
|
+
emoji?: string;
|
|
2183
|
+
icon?: IconProps$1['icon'];
|
|
2184
|
+
iconColor?: IconProps$1['color'];
|
|
2185
|
+
image?: ReactNode;
|
|
2186
|
+
imageProps?: Omit<BlockProps, 'children'>;
|
|
2187
|
+
imageSize?: number;
|
|
2188
|
+
title?: ReactNode;
|
|
2189
|
+
titleProps?: Omit<TextProps, 'children'>;
|
|
2190
|
+
type?: 'default' | 'page';
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
declare const Empty: FC<EmptyProps>;
|
|
2194
|
+
|
|
2195
|
+
type IconProps = SvgProps & DivProps$1;
|
|
2196
|
+
interface FileTypeIconProps extends IconProps {
|
|
2197
|
+
color?: string;
|
|
2198
|
+
filetype?: string;
|
|
2199
|
+
icon?: ReactNode;
|
|
2200
|
+
ref?: Ref<HTMLDivElement>;
|
|
2201
|
+
size?: number;
|
|
2202
|
+
type?: 'file' | 'folder';
|
|
2203
|
+
variant?: 'color' | 'mono';
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
declare const FileTypeIcon: FC<FileTypeIconProps>;
|
|
2207
|
+
|
|
2208
|
+
type EmojiType = 'anim' | 'flat' | 'modern' | 'mono' | 'raw' | '3d';
|
|
2209
|
+
|
|
2210
|
+
interface FluentEmojiProps extends DivProps$1 {
|
|
2211
|
+
emoji: string;
|
|
2212
|
+
ref?: Ref<HTMLImageElement>;
|
|
2213
|
+
size?: number;
|
|
2214
|
+
type?: EmojiType;
|
|
2215
|
+
unoptimized?: boolean;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
declare const FluentEmoji: FC<FluentEmojiProps>;
|
|
2219
|
+
|
|
2220
|
+
interface FontLoaderProps {
|
|
2221
|
+
url: string;
|
|
2222
|
+
}
|
|
2223
|
+
declare const FontLoader: react.NamedExoticComponent<FontLoaderProps>;
|
|
2224
|
+
|
|
2225
|
+
interface FooterProps extends FlexboxProps {
|
|
2226
|
+
bottom?: ReactNode;
|
|
2227
|
+
columns: FooterProps$1['columns'];
|
|
2228
|
+
contentMaxWidth?: number;
|
|
2229
|
+
theme?: 'light' | 'dark';
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
declare const Footer: react.NamedExoticComponent<FooterProps>;
|
|
2233
|
+
|
|
2234
|
+
interface TagProps extends Omit<TagProps$1, 'color' | 'variant'> {
|
|
2235
|
+
color?: TagProps$1['color'] | 'info';
|
|
2236
|
+
ref?: Ref<HTMLDivElement>;
|
|
2237
|
+
size?: 'small' | 'middle' | 'large';
|
|
2238
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
declare const Tag: FC<TagProps>;
|
|
2242
|
+
|
|
2243
|
+
type FormVariant = 'filled' | 'outlined' | 'borderless';
|
|
2244
|
+
type ItemsType = 'group' | 'flat';
|
|
2245
|
+
interface FormProps extends Omit<FormProps$1, 'variant'> {
|
|
2246
|
+
activeKey?: (string | number)[];
|
|
2247
|
+
children?: ReactNode;
|
|
2248
|
+
classNames?: FormGroupProps['classNames'] & {
|
|
2249
|
+
group?: string;
|
|
2250
|
+
item?: string;
|
|
2251
|
+
};
|
|
2252
|
+
collapsible?: boolean;
|
|
2253
|
+
defaultActiveKey?: (string | number)[];
|
|
2254
|
+
footer?: ReactNode;
|
|
2255
|
+
gap?: number | string;
|
|
2256
|
+
itemMinWidth?: FormItemProps['minWidth'];
|
|
2257
|
+
itemVariant?: FormProps$1['variant'];
|
|
2258
|
+
items?: FormGroupItemType[] | FormItemProps[];
|
|
2259
|
+
itemsType?: ItemsType;
|
|
2260
|
+
onCollapse?: (key: (string | number)[]) => void;
|
|
2261
|
+
ref?: Ref<FormInstance>;
|
|
2262
|
+
styles?: FormGroupProps['styles'] & {
|
|
2263
|
+
group?: CSSProperties;
|
|
2264
|
+
item?: CSSProperties;
|
|
2265
|
+
};
|
|
2266
|
+
variant?: FormVariant;
|
|
2267
|
+
}
|
|
2268
|
+
interface FormGroupItemType {
|
|
2269
|
+
children: FormItemProps[] | ReactNode;
|
|
2270
|
+
collapsible?: boolean;
|
|
2271
|
+
defaultActive?: boolean;
|
|
2272
|
+
desc?: ReactNode;
|
|
2273
|
+
extra?: ReactNode;
|
|
2274
|
+
icon?: IconProps$1['icon'];
|
|
2275
|
+
key?: string;
|
|
2276
|
+
title: ReactNode;
|
|
2277
|
+
variant?: FormVariant;
|
|
2278
|
+
}
|
|
2279
|
+
interface FormGroupProps extends Omit<CollapseProps, 'collapsible' | 'items' | 'defaultActiveKey' | 'activeKey' | 'variant'> {
|
|
2280
|
+
active?: boolean;
|
|
2281
|
+
children: ReactNode;
|
|
2282
|
+
collapsible?: boolean;
|
|
2283
|
+
defaultActive?: boolean;
|
|
2284
|
+
desc?: ReactNode;
|
|
2285
|
+
extra?: ReactNode;
|
|
2286
|
+
icon?: IconProps$1['icon'];
|
|
2287
|
+
keyValue?: string | number;
|
|
2288
|
+
onCollapse?: (active: boolean) => void;
|
|
2289
|
+
title?: ReactNode;
|
|
2290
|
+
variant?: FormVariant;
|
|
2291
|
+
}
|
|
2292
|
+
interface FormItemProps extends FormItemProps$1 {
|
|
2293
|
+
avatar?: FormTitleProps['avatar'];
|
|
2294
|
+
desc?: FormTitleProps['desc'];
|
|
2295
|
+
divider?: boolean;
|
|
2296
|
+
hidden?: boolean;
|
|
2297
|
+
minWidth?: string | number;
|
|
2298
|
+
tag?: FormTitleProps['tag'];
|
|
2299
|
+
variant?: FormVariant;
|
|
2300
|
+
}
|
|
2301
|
+
interface FormSubmitFooterProps extends Omit<FlexboxProps, 'onReset'> {
|
|
2302
|
+
buttonProps?: Omit<ButtonProps, 'children'>;
|
|
2303
|
+
children?: ReactNode;
|
|
2304
|
+
enableReset?: boolean;
|
|
2305
|
+
enableUnsavedWarning?: boolean;
|
|
2306
|
+
float?: boolean;
|
|
2307
|
+
onReset?: (value: any, preValue: any) => void;
|
|
2308
|
+
resetButtonProps?: Omit<ButtonProps, 'children'>;
|
|
2309
|
+
saveButtonProps?: Omit<ButtonProps, 'children'>;
|
|
2310
|
+
texts?: {
|
|
2311
|
+
reset?: string;
|
|
2312
|
+
submit?: string;
|
|
2313
|
+
unSaved?: string;
|
|
2314
|
+
unSavedWarning?: string;
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
interface FormTitleProps extends Omit<FlexboxProps, 'title'> {
|
|
2318
|
+
avatar?: ReactNode;
|
|
2319
|
+
classNames?: {
|
|
2320
|
+
content?: string;
|
|
2321
|
+
desc?: string;
|
|
2322
|
+
tag?: string;
|
|
2323
|
+
title?: string;
|
|
2324
|
+
};
|
|
2325
|
+
desc?: ReactNode;
|
|
2326
|
+
styles?: {
|
|
2327
|
+
content?: CSSProperties;
|
|
2328
|
+
desc?: CSSProperties;
|
|
2329
|
+
tag?: CSSProperties;
|
|
2330
|
+
title?: CSSProperties;
|
|
2331
|
+
};
|
|
2332
|
+
tag?: string;
|
|
2333
|
+
tagProps?: Omit<TagProps, 'children'>;
|
|
2334
|
+
title: ReactNode;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
declare const FormGroup: react.NamedExoticComponent<FormGroupProps>;
|
|
2338
|
+
|
|
2339
|
+
declare const FormItem: react.NamedExoticComponent<FormItemProps>;
|
|
2340
|
+
|
|
2341
|
+
declare const FormSubmitFooter: react.NamedExoticComponent<FormSubmitFooterProps>;
|
|
2342
|
+
|
|
2343
|
+
declare const FormTitle: FC<FormTitleProps>;
|
|
2344
|
+
|
|
2345
|
+
interface IForm {
|
|
2346
|
+
(props: FormProps & RefAttributes<FormInstance>): ReactNode;
|
|
2347
|
+
Group: typeof FormGroup;
|
|
2348
|
+
Item: typeof FormItem;
|
|
2349
|
+
Provider: typeof Form$1.Provider;
|
|
2350
|
+
SubmitFooter: typeof FormSubmitFooter;
|
|
2351
|
+
Title: typeof FormTitle;
|
|
2352
|
+
useForm: typeof Form$1.useForm;
|
|
2353
|
+
}
|
|
2354
|
+
declare const Form: IForm;
|
|
2355
|
+
|
|
2356
|
+
type ModalProps = Omit<ModalProps$1, 'okType' | 'wrapClassName'> & {
|
|
2357
|
+
allowFullscreen?: boolean;
|
|
2358
|
+
enableResponsive?: boolean;
|
|
2359
|
+
paddings?: {
|
|
2360
|
+
desktop?: number;
|
|
2361
|
+
mobile?: number;
|
|
2362
|
+
};
|
|
2363
|
+
};
|
|
2364
|
+
type ModalContextValue = {
|
|
2365
|
+
close: () => void;
|
|
2366
|
+
setCanDismissByClickOutside: (value: boolean) => void;
|
|
2367
|
+
};
|
|
2368
|
+
type ModalInstance = ModalContextValue & {
|
|
2369
|
+
destroy: () => void;
|
|
2370
|
+
update: (nextProps: Partial<ImperativeModalProps>) => void;
|
|
2371
|
+
};
|
|
2372
|
+
type ImperativeModalProps = ModalProps;
|
|
2373
|
+
type RawModalComponentProps = {
|
|
2374
|
+
onClose: () => void;
|
|
2375
|
+
open: boolean;
|
|
2376
|
+
};
|
|
2377
|
+
type RawModalComponent<P = any> = ComponentType<P>;
|
|
2378
|
+
type RawModalOptions<OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = {
|
|
2379
|
+
destroyDelay?: number;
|
|
2380
|
+
destroyOnClose?: boolean;
|
|
2381
|
+
onCloseKey?: CloseKey;
|
|
2382
|
+
openKey?: OpenKey;
|
|
2383
|
+
};
|
|
2384
|
+
type RawModalKeyOptions<OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = RawModalOptions<OpenKey, CloseKey> & {
|
|
2385
|
+
onCloseKey: CloseKey;
|
|
2386
|
+
openKey: OpenKey;
|
|
2387
|
+
};
|
|
2388
|
+
type RawModalInstance<P = any, OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = ModalContextValue & {
|
|
2389
|
+
destroy: () => void;
|
|
2390
|
+
update: (nextProps: Partial<Omit<P, Extract<OpenKey, keyof P> | Extract<CloseKey, keyof P>>>) => void;
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2393
|
+
type ModalHostProps = {
|
|
2394
|
+
root?: HTMLElement | ShadowRoot | null;
|
|
2395
|
+
};
|
|
2396
|
+
declare const ModalHost: ({ root }: ModalHostProps) => react_jsx_runtime.JSX.Element | null;
|
|
2397
|
+
declare const createModal: (props: ImperativeModalProps) => ModalInstance;
|
|
2398
|
+
declare function createRawModal<P extends RawModalComponentProps>(component: RawModalComponent<P>, props: Omit<P, 'open' | 'onClose'>, options?: RawModalOptions): RawModalInstance<P>;
|
|
2399
|
+
declare function createRawModal<P, OpenKey extends keyof P, CloseKey extends keyof P>(component: RawModalComponent<P>, props: Omit<P, OpenKey | CloseKey>, options: RawModalKeyOptions<OpenKey, CloseKey>): RawModalInstance<P, OpenKey, CloseKey>;
|
|
2400
|
+
|
|
2401
|
+
declare const Modal: react.NamedExoticComponent<ModalProps>;
|
|
2402
|
+
|
|
2403
|
+
declare const ModalProvider: react.NamedExoticComponent<{
|
|
2404
|
+
children: ReactNode;
|
|
2405
|
+
value: ModalContextValue;
|
|
2406
|
+
}>;
|
|
2407
|
+
declare const useModalContext: () => ModalContextValue;
|
|
2408
|
+
|
|
2409
|
+
type PickModalProps = Pick<ModalProps, 'style' | 'className' | 'allowFullscreen' | 'title' | 'width' | 'onCancel' | 'open' | 'centered' | 'destroyOnHidden' | 'paddings' | 'height' | 'enableResponsive' | 'afterClose' | 'afterOpenChange' | 'zIndex' | 'mask' | 'getContainer' | 'keyboard' | 'forceRender' | 'focusTriggerAfterClose' | 'closable' | 'loading' | 'closeIcon'>;
|
|
2410
|
+
type PickFormProps = Omit<FormProps, 'className' | 'style' | 'title' | 'styles' | 'classNames'>;
|
|
2411
|
+
interface FormModalProps extends PickModalProps, PickFormProps {
|
|
2412
|
+
classNames?: ModalProps['classNames'] & {
|
|
2413
|
+
form?: FormProps['className'];
|
|
2414
|
+
};
|
|
2415
|
+
onSubmit?: ModalProps['onOk'];
|
|
2416
|
+
ref?: Ref<FormInstance>;
|
|
2417
|
+
styles?: ModalProps['styles'] & {
|
|
2418
|
+
form?: FormProps['style'];
|
|
2419
|
+
};
|
|
2420
|
+
submitButtonProps?: ButtonProps;
|
|
2421
|
+
submitLoading?: ModalProps['confirmLoading'];
|
|
2422
|
+
submitText?: ModalProps['okText'];
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
declare const FormModal: react.NamedExoticComponent<FormModalProps>;
|
|
2426
|
+
|
|
2427
|
+
interface GridProps extends Omit<FlexboxProps, 'gap'> {
|
|
2428
|
+
gap?: string | number;
|
|
2429
|
+
maxItemWidth?: string | number;
|
|
2430
|
+
ref?: Ref<HTMLDivElement>;
|
|
2431
|
+
rows?: number;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
declare const Grid: FC<GridProps>;
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* Predefined smooth corners masks for common corner values
|
|
2438
|
+
*/
|
|
2439
|
+
declare const SMOOTH_CORNER_MASKS: {
|
|
2440
|
+
readonly circle: string;
|
|
2441
|
+
readonly ios: string;
|
|
2442
|
+
readonly sharp: string;
|
|
2443
|
+
readonly smooth: string;
|
|
2444
|
+
readonly square: string;
|
|
2445
|
+
readonly squircle: string;
|
|
2446
|
+
};
|
|
2447
|
+
|
|
2448
|
+
type AvatarItem = string | Omit<AvatarProps, 'size'>;
|
|
2449
|
+
interface GroupAvatarProps extends Omit<BlockProps, 'width' | 'height' | 'variant'> {
|
|
2450
|
+
avatarShape?: AvatarProps['shape'];
|
|
2451
|
+
avatars?: AvatarItem[];
|
|
2452
|
+
cornerShape?: keyof typeof SMOOTH_CORNER_MASKS;
|
|
2453
|
+
grid?: 2 | 3 | 'auto';
|
|
2454
|
+
ref?: Ref<HTMLDivElement>;
|
|
2455
|
+
size?: number;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
declare const GroupAvatar: FC<GroupAvatarProps>;
|
|
2459
|
+
|
|
2460
|
+
interface GuideCardProps extends Omit<FlexboxProps, 'title'> {
|
|
2461
|
+
afterClose?: () => void;
|
|
2462
|
+
alt?: string;
|
|
2463
|
+
classNames?: {
|
|
2464
|
+
content?: string;
|
|
2465
|
+
cover?: string;
|
|
2466
|
+
};
|
|
2467
|
+
closable?: boolean;
|
|
2468
|
+
closeIconProps?: Omit<ActionIconProps, 'icon' | 'onClick'>;
|
|
2469
|
+
cover?: string;
|
|
2470
|
+
coverProps?: ImgProps & ImageProps$2 & {
|
|
2471
|
+
priority?: boolean;
|
|
2472
|
+
};
|
|
2473
|
+
desc?: ReactNode;
|
|
2474
|
+
height?: number;
|
|
2475
|
+
onClose?: ActionIconProps['onClick'];
|
|
2476
|
+
ref?: Ref<HTMLDivElement>;
|
|
2477
|
+
shadow?: boolean;
|
|
2478
|
+
styles?: {
|
|
2479
|
+
content?: CSSProperties;
|
|
2480
|
+
cover?: CSSProperties;
|
|
2481
|
+
};
|
|
2482
|
+
title?: ReactNode;
|
|
2483
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
2484
|
+
width?: number;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
declare const GuideCard: react.NamedExoticComponent<GuideCardProps>;
|
|
2488
|
+
|
|
2489
|
+
interface HeaderProps extends FlexboxProps {
|
|
2490
|
+
actions?: ReactNode;
|
|
2491
|
+
actionsClassName?: string;
|
|
2492
|
+
actionsStyle?: CSSProperties;
|
|
2493
|
+
logo?: ReactNode;
|
|
2494
|
+
logoClassName?: string;
|
|
2495
|
+
logoStyle?: CSSProperties;
|
|
2496
|
+
nav?: ReactNode;
|
|
2497
|
+
navClassName?: string;
|
|
2498
|
+
navStyle?: CSSProperties;
|
|
2499
|
+
ref?: Ref<HTMLDivElement>;
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
declare const Header: react.NamedExoticComponent<HeaderProps>;
|
|
2503
|
+
|
|
2504
|
+
interface HighlighterThemeItem {
|
|
2505
|
+
displayName: string;
|
|
2506
|
+
id: string;
|
|
2507
|
+
}
|
|
2508
|
+
declare const highlighterThemes: HighlighterThemeItem[];
|
|
2509
|
+
|
|
2510
|
+
interface SyntaxHighlighterProps extends DivProps$1 {
|
|
2511
|
+
animated?: boolean;
|
|
2512
|
+
children: string;
|
|
2513
|
+
enableTransformer?: HighlighterProps['enableTransformer'];
|
|
2514
|
+
language: HighlighterProps['language'];
|
|
2515
|
+
ref?: Ref<HTMLDivElement>;
|
|
2516
|
+
theme?: HighlighterProps['theme'];
|
|
2517
|
+
variant?: HighlighterProps['variant'];
|
|
2518
|
+
}
|
|
2519
|
+
interface HighlighterProps extends Omit<FlexboxProps, 'children' | 'wrap'> {
|
|
2520
|
+
actionIconSize?: ActionIconProps['size'];
|
|
2521
|
+
actionsRender?: (props: {
|
|
2522
|
+
actionIconSize: ActionIconProps['size'];
|
|
2523
|
+
content: string;
|
|
2524
|
+
getContent: () => string;
|
|
2525
|
+
language: string;
|
|
2526
|
+
originalNode: ReactNode;
|
|
2527
|
+
}) => ReactNode;
|
|
2528
|
+
allowChangeLanguage?: boolean;
|
|
2529
|
+
animated?: boolean;
|
|
2530
|
+
bodyRender?: (props: {
|
|
2531
|
+
content: string;
|
|
2532
|
+
language: string;
|
|
2533
|
+
originalNode: ReactNode;
|
|
2534
|
+
}) => ReactNode;
|
|
2535
|
+
children: string;
|
|
2536
|
+
classNames?: {
|
|
2537
|
+
body?: string;
|
|
2538
|
+
content?: string;
|
|
2539
|
+
header?: string;
|
|
2540
|
+
};
|
|
2541
|
+
copyable?: boolean;
|
|
2542
|
+
defaultExpand?: boolean;
|
|
2543
|
+
enableTransformer?: boolean;
|
|
2544
|
+
fileName?: string;
|
|
2545
|
+
fullFeatured?: boolean;
|
|
2546
|
+
icon?: ReactNode;
|
|
2547
|
+
language: string;
|
|
2548
|
+
shadow?: boolean;
|
|
2549
|
+
showLanguage?: boolean;
|
|
2550
|
+
styles?: {
|
|
2551
|
+
body?: CSSProperties;
|
|
2552
|
+
content?: CSSProperties;
|
|
2553
|
+
header?: CSSProperties;
|
|
2554
|
+
};
|
|
2555
|
+
theme?: 'lobe-theme' | BuiltinTheme;
|
|
2556
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
2557
|
+
wrap?: boolean;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
declare const Highlighter: react.NamedExoticComponent<HighlighterProps>;
|
|
2561
|
+
|
|
2562
|
+
declare const SyntaxHighlighter: react.NamedExoticComponent<SyntaxHighlighterProps>;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Preprocessing options for markdown content
|
|
2566
|
+
*/
|
|
2567
|
+
interface PreprocessOptions {
|
|
2568
|
+
citationsLength?: number;
|
|
2569
|
+
enableCustomFootnotes?: boolean;
|
|
2570
|
+
enableLatex?: boolean;
|
|
2571
|
+
}
|
|
2572
|
+
declare const preprocessMarkdownContent: (str: string, { enableCustomFootnotes, enableLatex, citationsLength }?: PreprocessOptions) => string;
|
|
2573
|
+
|
|
2574
|
+
interface HotkeyInputProps {
|
|
2575
|
+
allowReset?: boolean;
|
|
2576
|
+
className?: string;
|
|
2577
|
+
defaultValue?: string;
|
|
2578
|
+
disabled?: boolean;
|
|
2579
|
+
hotkeyConflicts?: string[];
|
|
2580
|
+
isApple?: boolean;
|
|
2581
|
+
onBlur?: InputProps$1['onBlur'];
|
|
2582
|
+
onChange?: (value: string) => void;
|
|
2583
|
+
onConflict?: (conflictKey: string) => void;
|
|
2584
|
+
onFocus?: InputProps$1['onFocus'];
|
|
2585
|
+
onReset?: (currentValue: string, resetValue: string) => void;
|
|
2586
|
+
placeholder?: string;
|
|
2587
|
+
resetValue?: string;
|
|
2588
|
+
shadow?: boolean;
|
|
2589
|
+
style?: CSSProperties;
|
|
2590
|
+
texts?: {
|
|
2591
|
+
conflicts?: string;
|
|
2592
|
+
invalidCombination?: string;
|
|
2593
|
+
reset?: string;
|
|
2594
|
+
};
|
|
2595
|
+
value?: string;
|
|
2596
|
+
variant?: 'filled' | 'borderless' | 'outlined';
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
declare const HotkeyInput: react.NamedExoticComponent<HotkeyInputProps>;
|
|
2600
|
+
|
|
2601
|
+
interface PreviewGroupPreviewOptions extends GroupPreviewConfig {
|
|
2602
|
+
toolbarAddon?: ReactNode;
|
|
2603
|
+
}
|
|
2604
|
+
interface PreviewGroupProps {
|
|
2605
|
+
children?: ReactNode;
|
|
2606
|
+
enable?: boolean;
|
|
2607
|
+
items?: string[];
|
|
2608
|
+
preview?: boolean | PreviewGroupPreviewOptions;
|
|
2609
|
+
}
|
|
2610
|
+
interface ImagePreviewOptions extends PreviewConfig {
|
|
2611
|
+
toolbarAddon?: ReactNode;
|
|
2612
|
+
}
|
|
2613
|
+
interface ImageProps$1 extends Omit<ImageProps$2, 'preview'> {
|
|
2614
|
+
actions?: ReactNode;
|
|
2615
|
+
alwaysShowActions?: boolean;
|
|
2616
|
+
classNames?: {
|
|
2617
|
+
image?: string;
|
|
2618
|
+
wrapper?: string;
|
|
2619
|
+
};
|
|
2620
|
+
isLoading?: boolean;
|
|
2621
|
+
maxHeight?: number | string;
|
|
2622
|
+
maxWidth?: number | string;
|
|
2623
|
+
minHeight?: number | string;
|
|
2624
|
+
minWidth?: number | string;
|
|
2625
|
+
objectFit?: 'cover' | 'contain';
|
|
2626
|
+
preview?: boolean | ImagePreviewOptions;
|
|
2627
|
+
ref?: Ref<HTMLDivElement>;
|
|
2628
|
+
size?: number | string;
|
|
2629
|
+
styles?: {
|
|
2630
|
+
image?: CSSProperties;
|
|
2631
|
+
wrapper?: CSSProperties;
|
|
2632
|
+
};
|
|
2633
|
+
toolbarAddon?: ReactNode;
|
|
2634
|
+
variant?: 'borderless' | 'filled' | 'outlined';
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
declare const PreviewGroup: react.NamedExoticComponent<PreviewGroupProps>;
|
|
2638
|
+
|
|
2639
|
+
interface IImage {
|
|
2640
|
+
(props: ImageProps$1): ReactNode;
|
|
2641
|
+
PreviewGroup: typeof PreviewGroup;
|
|
2642
|
+
}
|
|
2643
|
+
declare const Image: IImage;
|
|
2644
|
+
|
|
2645
|
+
interface ImageSelectItem {
|
|
2646
|
+
alt?: string;
|
|
2647
|
+
icon?: IconProps$1['icon'];
|
|
2648
|
+
img: string;
|
|
2649
|
+
label: ReactNode;
|
|
2650
|
+
value: string;
|
|
2651
|
+
}
|
|
2652
|
+
interface ImageSelectProps extends FlexboxProps {
|
|
2653
|
+
className?: string;
|
|
2654
|
+
classNames?: {
|
|
2655
|
+
img?: string;
|
|
2656
|
+
};
|
|
2657
|
+
defaultValue?: SelectProps$1['defaultValue'];
|
|
2658
|
+
height?: number;
|
|
2659
|
+
onChange?: (value: this['value']) => void;
|
|
2660
|
+
options?: ImageSelectItem[];
|
|
2661
|
+
ref?: Ref<HTMLDivElement>;
|
|
2662
|
+
style?: CSSProperties;
|
|
2663
|
+
styles?: {
|
|
2664
|
+
img?: CSSProperties;
|
|
2665
|
+
};
|
|
2666
|
+
unoptimized?: boolean;
|
|
2667
|
+
value?: SelectProps$1['value'];
|
|
2668
|
+
width?: number;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
declare const ImageSelect: react.NamedExoticComponent<ImageSelectProps>;
|
|
2672
|
+
|
|
2673
|
+
declare const LayoutFooter: react.NamedExoticComponent<DivProps$1>;
|
|
2674
|
+
|
|
2675
|
+
interface LayoutProps {
|
|
2676
|
+
asideWidth?: number;
|
|
2677
|
+
children?: ReactNode;
|
|
2678
|
+
content?: ReactNode;
|
|
2679
|
+
footer?: ReactNode;
|
|
2680
|
+
header?: ReactNode;
|
|
2681
|
+
headerHeight?: number;
|
|
2682
|
+
helmet?: ReactNode;
|
|
2683
|
+
sidebar?: ReactNode;
|
|
2684
|
+
toc?: ReactNode;
|
|
2685
|
+
tocWidth?: number;
|
|
2686
|
+
}
|
|
2687
|
+
type LayoutFooterProps = DivProps$1;
|
|
2688
|
+
interface LayoutHeaderProps extends DivProps$1 {
|
|
2689
|
+
headerHeight?: number;
|
|
2690
|
+
}
|
|
2691
|
+
type LayoutMainProps = DivProps$1;
|
|
2692
|
+
interface LayoutSidebarProps extends DivProps$1 {
|
|
2693
|
+
headerHeight?: number;
|
|
2694
|
+
}
|
|
2695
|
+
interface LayoutSidebarInnerProps extends DivProps$1 {
|
|
2696
|
+
headerHeight?: number;
|
|
2697
|
+
}
|
|
2698
|
+
interface LayoutTocProps extends DivProps$1 {
|
|
2699
|
+
tocWidth?: number;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
declare const LayoutHeader: react.NamedExoticComponent<LayoutHeaderProps>;
|
|
2703
|
+
|
|
2704
|
+
declare const LayoutMain: react.NamedExoticComponent<DivProps$1>;
|
|
2705
|
+
|
|
2706
|
+
declare const LayoutSidebar: react.NamedExoticComponent<LayoutSidebarProps>;
|
|
2707
|
+
|
|
2708
|
+
declare const LayoutSidebarInner: react.NamedExoticComponent<LayoutSidebarInnerProps>;
|
|
2709
|
+
|
|
2710
|
+
declare const LayoutToc: react.NamedExoticComponent<LayoutTocProps>;
|
|
2711
|
+
|
|
2712
|
+
interface ILayout {
|
|
2713
|
+
(props: LayoutProps): ReactNode;
|
|
2714
|
+
Footer: typeof LayoutFooter;
|
|
2715
|
+
Header: typeof LayoutHeader;
|
|
2716
|
+
Main: typeof LayoutMain;
|
|
2717
|
+
Sidebar: typeof LayoutSidebar;
|
|
2718
|
+
SidebarInner: typeof LayoutSidebarInner;
|
|
2719
|
+
Toc: typeof LayoutToc;
|
|
2720
|
+
}
|
|
2721
|
+
declare const Layout: ILayout;
|
|
2722
|
+
|
|
2723
|
+
interface ListItemProps extends Omit<FlexboxProps, 'title'> {
|
|
2724
|
+
actions?: ReactNode;
|
|
2725
|
+
active?: boolean;
|
|
2726
|
+
addon?: ReactNode;
|
|
2727
|
+
avatar?: ReactNode;
|
|
2728
|
+
classNames?: {
|
|
2729
|
+
actions?: string;
|
|
2730
|
+
container?: string;
|
|
2731
|
+
content?: string;
|
|
2732
|
+
date?: string;
|
|
2733
|
+
desc?: string;
|
|
2734
|
+
pin?: string;
|
|
2735
|
+
title?: string;
|
|
2736
|
+
};
|
|
2737
|
+
date?: number;
|
|
2738
|
+
description?: ReactNode;
|
|
2739
|
+
key: string;
|
|
2740
|
+
loading?: boolean;
|
|
2741
|
+
onHoverChange?: (hover: boolean) => void;
|
|
2742
|
+
pin?: boolean;
|
|
2743
|
+
ref?: Ref<HTMLDivElement>;
|
|
2744
|
+
showAction?: boolean;
|
|
2745
|
+
styles?: {
|
|
2746
|
+
actions?: CSSProperties;
|
|
2747
|
+
container?: CSSProperties;
|
|
2748
|
+
content?: CSSProperties;
|
|
2749
|
+
date?: CSSProperties;
|
|
2750
|
+
desc?: CSSProperties;
|
|
2751
|
+
pin?: CSSProperties;
|
|
2752
|
+
title?: CSSProperties;
|
|
2753
|
+
};
|
|
2754
|
+
title: ReactNode;
|
|
2755
|
+
}
|
|
2756
|
+
interface ListProps extends Omit<FlexboxProps, 'onClick'> {
|
|
2757
|
+
activeKey?: string;
|
|
2758
|
+
classNames?: {
|
|
2759
|
+
item?: string;
|
|
2760
|
+
} & ListItemProps['classNames'];
|
|
2761
|
+
items: ListItemProps[];
|
|
2762
|
+
onClick?: (props: {
|
|
2763
|
+
item: ListItemProps;
|
|
2764
|
+
key: ListItemProps['key'];
|
|
2765
|
+
}) => void;
|
|
2766
|
+
ref?: Ref<HTMLDivElement>;
|
|
2767
|
+
styles?: {
|
|
2768
|
+
item?: CSSProperties;
|
|
2769
|
+
} & ListItemProps['styles'];
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
declare const ListItem: react.NamedExoticComponent<ListItemProps>;
|
|
2773
|
+
|
|
2774
|
+
interface IList {
|
|
2775
|
+
(props: ListProps & RefAttributes<HTMLDivElement>): ReactNode;
|
|
2776
|
+
Item: typeof ListItem;
|
|
2777
|
+
}
|
|
2778
|
+
declare const List: IList;
|
|
2779
|
+
|
|
2780
|
+
type LobeSelectSize = 'large' | 'middle' | 'small';
|
|
2781
|
+
type LobeSelectVariant = 'borderless' | 'filled' | 'outlined';
|
|
2782
|
+
type LobeSelectBehaviorVariant = 'default' | 'item-aligned';
|
|
2783
|
+
/**
|
|
2784
|
+
* Variant for how selected items are indicated in the popup.
|
|
2785
|
+
* - `check`: Display a checkmark icon next to selected items (default)
|
|
2786
|
+
* - `bold`: Display selected items with bold text, no checkmark
|
|
2787
|
+
*/
|
|
2788
|
+
type LobeSelectIndicatorVariant = 'check' | 'bold';
|
|
2789
|
+
interface LobeSelectOption<Value = string> {
|
|
2790
|
+
className?: string;
|
|
2791
|
+
disabled?: boolean;
|
|
2792
|
+
label: ReactNode;
|
|
2793
|
+
style?: CSSProperties;
|
|
2794
|
+
title?: string;
|
|
2795
|
+
value: Value;
|
|
2796
|
+
}
|
|
2797
|
+
interface LobeSelectOptionGroup<Value = string> {
|
|
2798
|
+
disabled?: boolean;
|
|
2799
|
+
label: ReactNode;
|
|
2800
|
+
options: LobeSelectOption<Value>[];
|
|
2801
|
+
}
|
|
2802
|
+
type LobeSelectOptions<Value = string> = Array<LobeSelectOption<Value> | LobeSelectOptionGroup<Value>>;
|
|
2803
|
+
interface LobeSelectClassNames {
|
|
2804
|
+
clear?: string;
|
|
2805
|
+
dropdown?: string;
|
|
2806
|
+
empty?: string;
|
|
2807
|
+
group?: string;
|
|
2808
|
+
groupLabel?: string;
|
|
2809
|
+
icon?: string;
|
|
2810
|
+
item?: string;
|
|
2811
|
+
itemIndicator?: string;
|
|
2812
|
+
itemText?: string;
|
|
2813
|
+
list?: string;
|
|
2814
|
+
option?: string;
|
|
2815
|
+
popup?: string;
|
|
2816
|
+
prefix?: string;
|
|
2817
|
+
root?: string;
|
|
2818
|
+
search?: string;
|
|
2819
|
+
suffix?: string;
|
|
2820
|
+
trigger?: string;
|
|
2821
|
+
value?: string;
|
|
2822
|
+
}
|
|
2823
|
+
interface LobeSelectProps<Value = string> {
|
|
2824
|
+
allowClear?: boolean;
|
|
2825
|
+
autoFocus?: boolean;
|
|
2826
|
+
/**
|
|
2827
|
+
* Behavior variant for Base UI Select.
|
|
2828
|
+
*
|
|
2829
|
+
* - `default`: regular dropdown positioning (alignItemWithTrigger=false, modal=false)
|
|
2830
|
+
* - `item-aligned`: aligns the selected item with trigger and uses modal=true
|
|
2831
|
+
* @default 'default'
|
|
2832
|
+
*/
|
|
2833
|
+
behaviorVariant?: LobeSelectBehaviorVariant;
|
|
2834
|
+
className?: string;
|
|
2835
|
+
classNames?: LobeSelectClassNames;
|
|
2836
|
+
defaultOpen?: boolean;
|
|
2837
|
+
defaultValue?: Value | Value[] | null;
|
|
2838
|
+
disabled?: boolean;
|
|
2839
|
+
id?: string;
|
|
2840
|
+
labelRender?: (option: LobeSelectOption<Value>) => ReactNode;
|
|
2841
|
+
/**
|
|
2842
|
+
* 设置弹窗滚动高度
|
|
2843
|
+
* @default 256
|
|
2844
|
+
*/
|
|
2845
|
+
listHeight?: number;
|
|
2846
|
+
listItemHeight?: number;
|
|
2847
|
+
loading?: boolean;
|
|
2848
|
+
mode?: 'multiple' | 'tags';
|
|
2849
|
+
name?: string;
|
|
2850
|
+
onChange?: (value: Value | Value[] | null, option?: LobeSelectOption<Value> | LobeSelectOption<Value>[]) => void;
|
|
2851
|
+
onOpenChange?: (open: boolean) => void;
|
|
2852
|
+
onSelect?: (value: Value, option?: LobeSelectOption<Value>) => void;
|
|
2853
|
+
open?: boolean;
|
|
2854
|
+
optionRender?: (option: LobeSelectOption<Value>, info: {
|
|
2855
|
+
index: number;
|
|
2856
|
+
}) => ReactNode;
|
|
2857
|
+
options?: LobeSelectOptions<Value>;
|
|
2858
|
+
placeholder?: ReactNode;
|
|
2859
|
+
popupClassName?: string;
|
|
2860
|
+
popupMatchSelectWidth?: boolean | number;
|
|
2861
|
+
prefix?: ReactNode | IconProps$1['icon'];
|
|
2862
|
+
readOnly?: boolean;
|
|
2863
|
+
required?: boolean;
|
|
2864
|
+
/**
|
|
2865
|
+
* Variant for how selected items are indicated in the popup.
|
|
2866
|
+
* - `check`: Display a checkmark icon next to selected items (default)
|
|
2867
|
+
* - `bold`: Display selected items with bold text, no checkmark
|
|
2868
|
+
* @default 'check'
|
|
2869
|
+
*/
|
|
2870
|
+
selectedIndicatorVariant?: LobeSelectIndicatorVariant;
|
|
2871
|
+
shadow?: boolean;
|
|
2872
|
+
showSearch?: boolean;
|
|
2873
|
+
size?: LobeSelectSize;
|
|
2874
|
+
style?: CSSProperties;
|
|
2875
|
+
suffixIcon?: IconProps$1['icon'] | ReactNode;
|
|
2876
|
+
suffixIconProps?: Omit<IconProps$1, 'icon'>;
|
|
2877
|
+
tokenSeparators?: string[];
|
|
2878
|
+
value?: Value | Value[] | null;
|
|
2879
|
+
variant?: LobeSelectVariant;
|
|
2880
|
+
virtual?: boolean;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
declare const LOBE_SELECT_CONTAINER_ATTR = "data-lobe-ui-select-container";
|
|
2884
|
+
|
|
2885
|
+
declare const LobeSelectRoot: typeof Select$1.Root;
|
|
2886
|
+
declare const LobeSelectBackdrop: react.ForwardRefExoticComponent<_base_ui_react_select.SelectBackdropProps & react.RefAttributes<HTMLDivElement>>;
|
|
2887
|
+
declare const LobeSelectSeparator: react.ForwardRefExoticComponent<node_modules__base_ui_react_esm_separator_Separator.SeparatorProps & react.RefAttributes<HTMLDivElement>>;
|
|
2888
|
+
type LobeSelectTriggerProps = Omit<ComponentPropsWithRef<typeof Select$1.Trigger>, 'children' | 'render'> & {
|
|
2889
|
+
children: ComponentProps<typeof Select$1.Trigger>['children'];
|
|
2890
|
+
shadow?: boolean;
|
|
2891
|
+
size?: LobeSelectSize;
|
|
2892
|
+
variant?: LobeSelectVariant;
|
|
2893
|
+
};
|
|
2894
|
+
declare const LobeSelectTrigger: {
|
|
2895
|
+
({ children, className, nativeButton, shadow, size, variant, ref: refProp, ...rest }: LobeSelectTriggerProps): react_jsx_runtime.JSX.Element;
|
|
2896
|
+
displayName: string;
|
|
2897
|
+
};
|
|
2898
|
+
type LobeSelectIconProps = ComponentProps<typeof Select$1.Icon>;
|
|
2899
|
+
declare const LobeSelectIcon: {
|
|
2900
|
+
({ className, ...rest }: LobeSelectIconProps): react_jsx_runtime.JSX.Element;
|
|
2901
|
+
displayName: string;
|
|
2902
|
+
};
|
|
2903
|
+
type LobeSelectValueProps = ComponentProps<typeof Select$1.Value>;
|
|
2904
|
+
declare const LobeSelectValue: {
|
|
2905
|
+
({ className, ...rest }: LobeSelectValueProps): react_jsx_runtime.JSX.Element;
|
|
2906
|
+
displayName: string;
|
|
2907
|
+
};
|
|
2908
|
+
type LobeSelectPortalProps = ComponentProps<typeof Select$1.Portal> & {
|
|
2909
|
+
/**
|
|
2910
|
+
* When `container` is not provided, it uses a shared container created by `usePortalContainer`.
|
|
2911
|
+
*/
|
|
2912
|
+
container?: HTMLElement | null;
|
|
2913
|
+
};
|
|
2914
|
+
declare const LobeSelectPortal: {
|
|
2915
|
+
({ container, ...rest }: LobeSelectPortalProps): react_jsx_runtime.JSX.Element;
|
|
2916
|
+
displayName: string;
|
|
2917
|
+
};
|
|
2918
|
+
type LobeSelectPositionerProps = ComponentProps<typeof Select$1.Positioner>;
|
|
2919
|
+
declare const LobeSelectPositioner: {
|
|
2920
|
+
({ align, alignItemWithTrigger, className, side, sideOffset, ...rest }: LobeSelectPositionerProps): react_jsx_runtime.JSX.Element;
|
|
2921
|
+
displayName: string;
|
|
2922
|
+
};
|
|
2923
|
+
type LobeSelectPopupProps = ComponentProps<typeof Select$1.Popup>;
|
|
2924
|
+
declare const LobeSelectPopup: {
|
|
2925
|
+
({ className, ...rest }: LobeSelectPopupProps): react_jsx_runtime.JSX.Element;
|
|
2926
|
+
displayName: string;
|
|
2927
|
+
};
|
|
2928
|
+
type LobeSelectListProps = ComponentProps<typeof Select$1.List>;
|
|
2929
|
+
declare const LobeSelectList: {
|
|
2930
|
+
({ className, ...rest }: LobeSelectListProps): react_jsx_runtime.JSX.Element;
|
|
2931
|
+
displayName: string;
|
|
2932
|
+
};
|
|
2933
|
+
type LobeSelectItemProps = ComponentProps<typeof Select$1.Item>;
|
|
2934
|
+
declare const LobeSelectItem: {
|
|
2935
|
+
({ className, ...rest }: LobeSelectItemProps): react_jsx_runtime.JSX.Element;
|
|
2936
|
+
displayName: string;
|
|
2937
|
+
};
|
|
2938
|
+
type LobeSelectItemTextProps = ComponentProps<typeof Select$1.ItemText>;
|
|
2939
|
+
declare const LobeSelectItemText: {
|
|
2940
|
+
({ className, ...rest }: LobeSelectItemTextProps): react_jsx_runtime.JSX.Element;
|
|
2941
|
+
displayName: string;
|
|
2942
|
+
};
|
|
2943
|
+
type LobeSelectItemIndicatorProps = ComponentProps<typeof Select$1.ItemIndicator>;
|
|
2944
|
+
declare const LobeSelectItemIndicator: {
|
|
2945
|
+
({ className, ...rest }: LobeSelectItemIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
2946
|
+
displayName: string;
|
|
2947
|
+
};
|
|
2948
|
+
type LobeSelectGroupProps = ComponentProps<typeof Select$1.Group>;
|
|
2949
|
+
declare const LobeSelectGroup: {
|
|
2950
|
+
({ className, ...rest }: LobeSelectGroupProps): react_jsx_runtime.JSX.Element;
|
|
2951
|
+
displayName: string;
|
|
2952
|
+
};
|
|
2953
|
+
type LobeSelectGroupLabelProps = ComponentProps<typeof Select$1.GroupLabel>;
|
|
2954
|
+
declare const LobeSelectGroupLabel: {
|
|
2955
|
+
({ className, ...rest }: LobeSelectGroupLabelProps): react_jsx_runtime.JSX.Element;
|
|
2956
|
+
displayName: string;
|
|
2957
|
+
};
|
|
2958
|
+
type LobeSelectScrollUpArrowProps = ComponentProps<typeof Select$1.ScrollUpArrow>;
|
|
2959
|
+
declare const LobeSelectScrollUpArrow: {
|
|
2960
|
+
({ className, ...rest }: LobeSelectScrollUpArrowProps): react_jsx_runtime.JSX.Element;
|
|
2961
|
+
displayName: string;
|
|
2962
|
+
};
|
|
2963
|
+
type LobeSelectScrollDownArrowProps = ComponentProps<typeof Select$1.ScrollDownArrow>;
|
|
2964
|
+
declare const LobeSelectScrollDownArrow: {
|
|
2965
|
+
({ className, ...rest }: LobeSelectScrollDownArrowProps): react_jsx_runtime.JSX.Element;
|
|
2966
|
+
displayName: string;
|
|
2967
|
+
};
|
|
2968
|
+
type LobeSelectArrowProps = ComponentProps<typeof Select$1.Arrow>;
|
|
2969
|
+
declare const LobeSelectArrow: {
|
|
2970
|
+
({ className, ...rest }: LobeSelectArrowProps): react_jsx_runtime.JSX.Element;
|
|
2971
|
+
displayName: string;
|
|
2972
|
+
};
|
|
2973
|
+
|
|
2974
|
+
declare const LobeSelect: react.NamedExoticComponent<LobeSelectProps<any>>;
|
|
2975
|
+
|
|
2976
|
+
type LobeSwitchSize = 'default' | 'small';
|
|
2977
|
+
type LobeSwitchChangeEventHandler = (checked: boolean, event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
2978
|
+
type LobeSwitchClickEventHandler = LobeSwitchChangeEventHandler;
|
|
2979
|
+
interface LobeSwitchClassNames {
|
|
2980
|
+
content?: string;
|
|
2981
|
+
root?: string;
|
|
2982
|
+
thumb?: string;
|
|
2983
|
+
}
|
|
2984
|
+
interface LobeSwitchStyles {
|
|
2985
|
+
content?: CSSProperties;
|
|
2986
|
+
root?: CSSProperties;
|
|
2987
|
+
thumb?: CSSProperties;
|
|
2988
|
+
}
|
|
2989
|
+
interface LobeSwitchContextType {
|
|
2990
|
+
isChecked: boolean;
|
|
2991
|
+
isPressed: boolean;
|
|
2992
|
+
setIsChecked: (checked: boolean) => void;
|
|
2993
|
+
setIsPressed: (pressed: boolean) => void;
|
|
2994
|
+
}
|
|
2995
|
+
type LobeSwitchRootProps = Omit<ComponentProps<typeof Switch.Root>, 'render'> & HTMLMotionProps<'button'> & {
|
|
2996
|
+
size?: LobeSwitchSize;
|
|
2997
|
+
};
|
|
2998
|
+
type LobeSwitchThumbProps = Omit<ComponentProps<typeof Switch.Thumb>, 'render'> & HTMLMotionProps<'span'> & {
|
|
2999
|
+
pressedAnimation?: TargetAndTransition | boolean;
|
|
3000
|
+
size?: LobeSwitchSize;
|
|
3001
|
+
transition?: Transition;
|
|
3002
|
+
};
|
|
3003
|
+
type LobeSwitchIconPosition = 'left' | 'right' | 'thumb';
|
|
3004
|
+
type LobeSwitchIconProps = HTMLMotionProps<'span'> & {
|
|
3005
|
+
position: LobeSwitchIconPosition;
|
|
3006
|
+
transition?: Transition;
|
|
3007
|
+
};
|
|
3008
|
+
interface LobeSwitchProps {
|
|
3009
|
+
/**
|
|
3010
|
+
* Whether to set focus automatically when mounted
|
|
3011
|
+
*/
|
|
3012
|
+
autoFocus?: boolean;
|
|
3013
|
+
/**
|
|
3014
|
+
* Whether the switch is checked
|
|
3015
|
+
*/
|
|
3016
|
+
checked?: boolean;
|
|
3017
|
+
/**
|
|
3018
|
+
* Icon to show when checked (left position)
|
|
3019
|
+
*/
|
|
3020
|
+
checkedChildren?: ReactNode;
|
|
3021
|
+
/**
|
|
3022
|
+
* Custom class name
|
|
3023
|
+
*/
|
|
3024
|
+
className?: string;
|
|
3025
|
+
/**
|
|
3026
|
+
* Custom class names for each part
|
|
3027
|
+
*/
|
|
3028
|
+
classNames?: LobeSwitchClassNames;
|
|
3029
|
+
/**
|
|
3030
|
+
* Initial checked state (uncontrolled)
|
|
3031
|
+
*/
|
|
3032
|
+
defaultChecked?: boolean;
|
|
3033
|
+
/**
|
|
3034
|
+
* Alias for `defaultChecked`
|
|
3035
|
+
*/
|
|
3036
|
+
defaultValue?: boolean;
|
|
3037
|
+
/**
|
|
3038
|
+
* Whether the switch is disabled
|
|
3039
|
+
*/
|
|
3040
|
+
disabled?: boolean;
|
|
3041
|
+
/**
|
|
3042
|
+
* Element id
|
|
3043
|
+
*/
|
|
3044
|
+
id?: string;
|
|
3045
|
+
/**
|
|
3046
|
+
* Show loading indicator
|
|
3047
|
+
*/
|
|
3048
|
+
loading?: boolean;
|
|
3049
|
+
/**
|
|
3050
|
+
* Name attribute for form submission
|
|
3051
|
+
*/
|
|
3052
|
+
name?: string;
|
|
3053
|
+
/**
|
|
3054
|
+
* Callback when the switch state changes
|
|
3055
|
+
*/
|
|
3056
|
+
onChange?: LobeSwitchChangeEventHandler;
|
|
3057
|
+
/**
|
|
3058
|
+
* Callback when clicking the switch
|
|
3059
|
+
*/
|
|
3060
|
+
onClick?: LobeSwitchClickEventHandler;
|
|
3061
|
+
/**
|
|
3062
|
+
* Reference to the root element
|
|
3063
|
+
*/
|
|
3064
|
+
ref?: Ref<HTMLButtonElement>;
|
|
3065
|
+
/**
|
|
3066
|
+
* Additional class name for root element
|
|
3067
|
+
*/
|
|
3068
|
+
rootClassName?: string;
|
|
3069
|
+
/**
|
|
3070
|
+
* Size of the switch
|
|
3071
|
+
* @default 'default'
|
|
3072
|
+
*/
|
|
3073
|
+
size?: LobeSwitchSize;
|
|
3074
|
+
/**
|
|
3075
|
+
* Custom inline style
|
|
3076
|
+
*/
|
|
3077
|
+
style?: CSSProperties;
|
|
3078
|
+
/**
|
|
3079
|
+
* Custom styles for each part
|
|
3080
|
+
*/
|
|
3081
|
+
styles?: LobeSwitchStyles;
|
|
3082
|
+
/**
|
|
3083
|
+
* Tab index for keyboard navigation
|
|
3084
|
+
*/
|
|
3085
|
+
tabIndex?: number;
|
|
3086
|
+
/**
|
|
3087
|
+
* Native title attribute
|
|
3088
|
+
*/
|
|
3089
|
+
title?: string;
|
|
3090
|
+
/**
|
|
3091
|
+
* Icon to show when unchecked (right position)
|
|
3092
|
+
*/
|
|
3093
|
+
unCheckedChildren?: ReactNode;
|
|
3094
|
+
/**
|
|
3095
|
+
* Alias for `checked`
|
|
3096
|
+
*/
|
|
3097
|
+
value?: boolean;
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
declare const styles$1: {
|
|
3101
|
+
icon: string;
|
|
3102
|
+
iconLeft: string;
|
|
3103
|
+
iconLeftSmall: string;
|
|
3104
|
+
iconRight: string;
|
|
3105
|
+
iconRightSmall: string;
|
|
3106
|
+
iconThumb: string;
|
|
3107
|
+
loading: string;
|
|
3108
|
+
root: string;
|
|
3109
|
+
rootDefault: string;
|
|
3110
|
+
rootSmall: string;
|
|
3111
|
+
thumb: string;
|
|
3112
|
+
thumbDefault: string;
|
|
3113
|
+
thumbSmall: string;
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
declare const useLobeSwitchContext: () => LobeSwitchContextType;
|
|
3117
|
+
type LobeSwitchRootInternalProps = Omit<LobeSwitchRootProps, 'onCheckedChange' | 'onClick'> & {
|
|
3118
|
+
onCheckedChange?: LobeSwitchChangeEventHandler;
|
|
3119
|
+
onClick?: LobeSwitchChangeEventHandler;
|
|
3120
|
+
};
|
|
3121
|
+
declare const LobeSwitchRoot: {
|
|
3122
|
+
({ checked, className, defaultChecked, onCheckedChange, onClick, size, children, disabled, readOnly, required, inputRef, id, name, ...rest }: LobeSwitchRootInternalProps): react_jsx_runtime.JSX.Element;
|
|
3123
|
+
displayName: string;
|
|
3124
|
+
};
|
|
3125
|
+
declare const LobeSwitchThumb: {
|
|
3126
|
+
({ className, pressedAnimation, size, transition, children, ...rest }: LobeSwitchThumbProps): react_jsx_runtime.JSX.Element;
|
|
3127
|
+
displayName: string;
|
|
3128
|
+
};
|
|
3129
|
+
declare const LobeSwitchIcon: {
|
|
3130
|
+
({ children, className, position, transition, ...rest }: LobeSwitchIconProps & {
|
|
3131
|
+
children?: React.ReactNode;
|
|
3132
|
+
size?: "default" | "small";
|
|
3133
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3134
|
+
displayName: string;
|
|
3135
|
+
};
|
|
3136
|
+
|
|
3137
|
+
declare const LobeSwitch: react.NamedExoticComponent<LobeSwitchProps>;
|
|
3138
|
+
|
|
3139
|
+
interface MermaidThemeItem {
|
|
3140
|
+
background?: string;
|
|
3141
|
+
displayName: string;
|
|
3142
|
+
id: string;
|
|
3143
|
+
}
|
|
3144
|
+
declare const mermaidThemes: MermaidThemeItem[];
|
|
3145
|
+
|
|
3146
|
+
interface SyntaxMermaidProps {
|
|
3147
|
+
animated?: boolean;
|
|
3148
|
+
children: string;
|
|
3149
|
+
className?: string;
|
|
3150
|
+
fallbackClassName?: string;
|
|
3151
|
+
ref?: Ref<HTMLDivElement>;
|
|
3152
|
+
style?: CSSProperties;
|
|
3153
|
+
theme?: MermaidProps['theme'];
|
|
3154
|
+
variant?: MermaidProps['variant'];
|
|
3155
|
+
}
|
|
3156
|
+
interface MermaidProps extends DivProps$1 {
|
|
3157
|
+
actionIconSize?: ActionIconProps['size'];
|
|
3158
|
+
actionsRender?: (props: {
|
|
3159
|
+
actionIconSize: ActionIconProps['size'];
|
|
3160
|
+
content: string;
|
|
3161
|
+
getContent: () => string;
|
|
3162
|
+
originalNode: ReactNode;
|
|
3163
|
+
}) => ReactNode;
|
|
3164
|
+
animated?: boolean;
|
|
3165
|
+
bodyRender?: (props: {
|
|
3166
|
+
content: string;
|
|
3167
|
+
originalNode: ReactNode;
|
|
3168
|
+
}) => ReactNode;
|
|
3169
|
+
children: string;
|
|
3170
|
+
classNames?: {
|
|
3171
|
+
body?: string;
|
|
3172
|
+
content?: string;
|
|
3173
|
+
header?: string;
|
|
3174
|
+
};
|
|
3175
|
+
copyable?: boolean;
|
|
3176
|
+
defaultExpand?: boolean;
|
|
3177
|
+
fileName?: string;
|
|
3178
|
+
fullFeatured?: boolean;
|
|
3179
|
+
language?: string;
|
|
3180
|
+
shadow?: boolean;
|
|
3181
|
+
showLanguage?: boolean;
|
|
3182
|
+
styles?: {
|
|
3183
|
+
body?: CSSProperties;
|
|
3184
|
+
content?: CSSProperties;
|
|
3185
|
+
header?: CSSProperties;
|
|
3186
|
+
};
|
|
3187
|
+
theme?: 'lobe-theme' | MermaidConfig['theme'];
|
|
3188
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
declare const Mermaid: react.NamedExoticComponent<MermaidProps>;
|
|
3192
|
+
|
|
3193
|
+
declare const SyntaxMermaid: react.NamedExoticComponent<SyntaxMermaidProps>;
|
|
3194
|
+
|
|
3195
|
+
type ImageProps = ImageProps$1;
|
|
3196
|
+
|
|
3197
|
+
interface CitationItem {
|
|
3198
|
+
alt?: string;
|
|
3199
|
+
summary?: string;
|
|
3200
|
+
title?: string;
|
|
3201
|
+
url: string;
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
interface SnippetProps extends FlexboxProps {
|
|
3205
|
+
children: string;
|
|
3206
|
+
copyable?: boolean;
|
|
3207
|
+
language?: string;
|
|
3208
|
+
prefix?: string;
|
|
3209
|
+
ref?: Ref<HTMLDivElement>;
|
|
3210
|
+
shadow?: boolean;
|
|
3211
|
+
spotlight?: boolean;
|
|
3212
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
declare const Snippet: FC<SnippetProps>;
|
|
3216
|
+
|
|
3217
|
+
type PreProps = HighlighterProps;
|
|
3218
|
+
|
|
3219
|
+
interface VideoProps$1 extends VideoProps$2, Pick<FlexboxProps, 'width' | 'height'> {
|
|
3220
|
+
autoPlay?: boolean;
|
|
3221
|
+
classNames?: {
|
|
3222
|
+
mask?: string;
|
|
3223
|
+
video?: string;
|
|
3224
|
+
wrapper?: string;
|
|
3225
|
+
};
|
|
3226
|
+
isLoading?: boolean;
|
|
3227
|
+
loop?: boolean;
|
|
3228
|
+
maxHeight?: number | string;
|
|
3229
|
+
maxWidth?: number | string;
|
|
3230
|
+
minHeight?: number | string;
|
|
3231
|
+
minWidth?: number | string;
|
|
3232
|
+
muted?: HTMLVideoElement['muted'];
|
|
3233
|
+
onEnded?: VideoProps$2['onEnded'];
|
|
3234
|
+
onMouseEnter?: VideoProps$2['onMouseEnter'];
|
|
3235
|
+
onMouseLeave?: VideoProps$2['onMouseLeave'];
|
|
3236
|
+
onPause?: VideoProps$2['onPause'];
|
|
3237
|
+
onPlay?: VideoProps$2['onPlay'];
|
|
3238
|
+
onPlaying?: VideoProps$2['onPlaying'];
|
|
3239
|
+
onProgress?: VideoProps$2['onProgress'];
|
|
3240
|
+
poster?: string;
|
|
3241
|
+
preload?: HTMLVideoElement['preload'];
|
|
3242
|
+
preview?: boolean;
|
|
3243
|
+
ref?: Ref<HTMLDivElement>;
|
|
3244
|
+
size?: number | string;
|
|
3245
|
+
src: string;
|
|
3246
|
+
styles?: {
|
|
3247
|
+
mask?: CSSProperties;
|
|
3248
|
+
video?: CSSProperties;
|
|
3249
|
+
wrapper?: CSSProperties;
|
|
3250
|
+
};
|
|
3251
|
+
variant?: 'borderless' | 'filled' | 'outlined';
|
|
3252
|
+
}
|
|
3253
|
+
declare const Video: react.NamedExoticComponent<VideoProps$1>;
|
|
3254
|
+
|
|
3255
|
+
type VideoProps = VideoProps$1;
|
|
3256
|
+
|
|
3257
|
+
interface TabsProps extends TabsProps$1 {
|
|
3258
|
+
compact?: boolean;
|
|
3259
|
+
variant?: 'square' | 'rounded' | 'point';
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
declare const Tabs: FC<TabsProps>;
|
|
3263
|
+
|
|
3264
|
+
interface TypographyProps extends DivProps$1 {
|
|
3265
|
+
borderRadius?: number;
|
|
3266
|
+
fontSize?: number;
|
|
3267
|
+
headerMultiple?: number;
|
|
3268
|
+
lineHeight?: number;
|
|
3269
|
+
marginMultiple?: number;
|
|
3270
|
+
ref?: Ref<HTMLDivElement>;
|
|
3271
|
+
}
|
|
3272
|
+
interface SyntaxMarkdownProps {
|
|
3273
|
+
allowHtml?: boolean;
|
|
3274
|
+
allowHtmlList?: ElementType[];
|
|
3275
|
+
animated?: boolean;
|
|
3276
|
+
children: string;
|
|
3277
|
+
citations?: CitationItem[];
|
|
3278
|
+
componentProps?: {
|
|
3279
|
+
a?: Partial<AProps & AnchorProps>;
|
|
3280
|
+
highlight?: Partial<HighlighterProps>;
|
|
3281
|
+
img?: Partial<ImageProps>;
|
|
3282
|
+
mermaid?: Partial<MermaidProps>;
|
|
3283
|
+
pre?: Partial<PreProps>;
|
|
3284
|
+
video?: Partial<VideoProps>;
|
|
3285
|
+
};
|
|
3286
|
+
components?: Components & Record<string, FC>;
|
|
3287
|
+
enableCustomFootnotes?: boolean;
|
|
3288
|
+
enableGithubAlert?: boolean;
|
|
3289
|
+
enableLatex?: boolean;
|
|
3290
|
+
enableMermaid?: boolean;
|
|
3291
|
+
enableStream?: boolean;
|
|
3292
|
+
fullFeaturedCodeBlock?: boolean;
|
|
3293
|
+
reactMarkdownProps?: Omit<Readonly<Options>, 'components' | 'rehypePlugins' | 'remarkPlugins'>;
|
|
3294
|
+
rehypePlugins?: Pluggable[];
|
|
3295
|
+
rehypePluginsAhead?: Pluggable[];
|
|
3296
|
+
remarkPlugins?: Pluggable[];
|
|
3297
|
+
remarkPluginsAhead?: Pluggable[];
|
|
3298
|
+
showFootnotes?: boolean;
|
|
3299
|
+
variant?: 'default' | 'chat';
|
|
3300
|
+
}
|
|
3301
|
+
interface MarkdownProps extends SyntaxMarkdownProps, Omit<TypographyProps, 'children'> {
|
|
3302
|
+
className?: string;
|
|
3303
|
+
customRender?: (dom: ReactNode, context: {
|
|
3304
|
+
text: string;
|
|
3305
|
+
}) => ReactNode;
|
|
3306
|
+
enableImageGallery?: boolean;
|
|
3307
|
+
onDoubleClick?: () => void;
|
|
3308
|
+
ref?: Ref<HTMLDivElement>;
|
|
3309
|
+
style?: CSSProperties;
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
declare const Markdown: react.NamedExoticComponent<MarkdownProps>;
|
|
3313
|
+
|
|
3314
|
+
declare const Typography: react.NamedExoticComponent<TypographyProps>;
|
|
3315
|
+
|
|
3316
|
+
interface SearchResultItem {
|
|
3317
|
+
alt?: string;
|
|
3318
|
+
summary?: string;
|
|
3319
|
+
title?: string;
|
|
3320
|
+
url: string;
|
|
3321
|
+
}
|
|
3322
|
+
interface SearchResultCardsProps extends FlexboxProps {
|
|
3323
|
+
dataSource: string[] | SearchResultItem[];
|
|
3324
|
+
ref?: Ref<HTMLDivElement>;
|
|
3325
|
+
}
|
|
3326
|
+
declare const SearchResultCards: react.NamedExoticComponent<SearchResultCardsProps>;
|
|
3327
|
+
|
|
3328
|
+
declare const rehypeCustomFootnotes: () => (tree: any, file: any) => void;
|
|
3329
|
+
|
|
3330
|
+
declare const rehypeKatexDir: () => (tree: Node) => void;
|
|
3331
|
+
|
|
3332
|
+
declare const rehypeStreamAnimated: () => (tree: Root) => void;
|
|
3333
|
+
|
|
3334
|
+
/**
|
|
3335
|
+
* Remark plugin to handle <br> and <br/> tags in markdown text
|
|
3336
|
+
* This plugin converts <br> and <br/> tags to proper HTML elements
|
|
3337
|
+
* without requiring allowHtml to be enabled
|
|
3338
|
+
*/
|
|
3339
|
+
declare const remarkBr: () => (tree: any) => void;
|
|
3340
|
+
|
|
3341
|
+
interface RemarkColorOptions {
|
|
3342
|
+
/**
|
|
3343
|
+
* 自定义颜色验证函数
|
|
3344
|
+
*/
|
|
3345
|
+
colorValidator?: (colorString: string) => boolean;
|
|
3346
|
+
}
|
|
3347
|
+
/**
|
|
3348
|
+
* Remark plugin to handle color syntax in markdown code spans
|
|
3349
|
+
* Supports GitHub-style color visualization for HEX, RGB, and HSL colors
|
|
3350
|
+
*
|
|
3351
|
+
* @example
|
|
3352
|
+
* `#FF0000` -> renders with red color preview
|
|
3353
|
+
* `rgb(255, 0, 0)` -> renders with red color preview
|
|
3354
|
+
* `hsl(0, 100%, 50%)` -> renders with red color preview
|
|
3355
|
+
*/
|
|
3356
|
+
declare const remarkColor: (options?: RemarkColorOptions) => (tree: any) => void;
|
|
3357
|
+
|
|
3358
|
+
declare const remarkCustomFootnotes: () => (tree: any, file: any) => void;
|
|
3359
|
+
|
|
3360
|
+
interface RemarkGfmPlusOptions {
|
|
3361
|
+
allowHtmlTags?: string[];
|
|
3362
|
+
}
|
|
3363
|
+
declare const remarkGfmPlus: (options?: RemarkGfmPlusOptions) => (tree: any) => void;
|
|
3364
|
+
|
|
3365
|
+
interface RemarkVideoOptions {
|
|
3366
|
+
/**
|
|
3367
|
+
* 支持的视频标签名,默认为 ['video']
|
|
3368
|
+
*/
|
|
3369
|
+
videoTags?: string[];
|
|
3370
|
+
}
|
|
3371
|
+
/**
|
|
3372
|
+
* Remark plugin to handle <video> tags in markdown text
|
|
3373
|
+
* This plugin converts <video> tags to proper video elements
|
|
3374
|
+
* without requiring allowHtml to be enabled
|
|
3375
|
+
*
|
|
3376
|
+
* @example
|
|
3377
|
+
* <video src="https://example.com/video.mp4" />
|
|
3378
|
+
* <video src="https://example.com/video.mp4" controls width="400" height="300" />
|
|
3379
|
+
*/
|
|
3380
|
+
declare const remarkVideo: (options?: RemarkVideoOptions) => (tree: any) => void;
|
|
3381
|
+
|
|
3382
|
+
interface MaskShadowProps extends FlexboxProps {
|
|
3383
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
3384
|
+
size?: number;
|
|
3385
|
+
visibility?: 'auto' | 'always' | 'never';
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
declare const MaskShadow: react.NamedExoticComponent<MaskShadowProps>;
|
|
3389
|
+
|
|
3390
|
+
interface MaterialFileTypeIconProps extends DivProps$1 {
|
|
3391
|
+
fallbackUnknownType?: boolean;
|
|
3392
|
+
filename: string;
|
|
3393
|
+
open?: boolean;
|
|
3394
|
+
size?: number;
|
|
3395
|
+
type?: 'file' | 'folder';
|
|
3396
|
+
variant?: 'raw' | 'file' | 'folder';
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
declare const MaterialFileTypeIcon: FC<MaterialFileTypeIconProps>;
|
|
3400
|
+
|
|
3401
|
+
declare const styles: {
|
|
3402
|
+
danger: string;
|
|
3403
|
+
empty: string;
|
|
3404
|
+
extra: string;
|
|
3405
|
+
groupLabel: string;
|
|
3406
|
+
icon: string;
|
|
3407
|
+
item: string;
|
|
3408
|
+
itemContent: string;
|
|
3409
|
+
label: string;
|
|
3410
|
+
popup: string;
|
|
3411
|
+
positioner: string;
|
|
3412
|
+
separator: string;
|
|
3413
|
+
submenuArrow: string;
|
|
3414
|
+
};
|
|
3415
|
+
|
|
3416
|
+
interface I18nProviderProps {
|
|
3417
|
+
children: ReactNode;
|
|
3418
|
+
locale?: string;
|
|
3419
|
+
motion: MotionComponentType;
|
|
3420
|
+
resources?: TranslationResourcesInput;
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
declare const I18nProvider: react.NamedExoticComponent<I18nProviderProps>;
|
|
3424
|
+
|
|
3425
|
+
declare const useTranslation: (fallbackResources?: TranslationResources) => {
|
|
3426
|
+
locale: string;
|
|
3427
|
+
t: (key: TranslationKey) => string;
|
|
3428
|
+
};
|
|
3429
|
+
|
|
3430
|
+
type ScrollAreaRootProps = react__default.ComponentProps<typeof ScrollArea$1.Root>;
|
|
3431
|
+
type ScrollAreaViewportProps = react__default.ComponentProps<typeof ScrollArea$1.Viewport> & {
|
|
3432
|
+
/**
|
|
3433
|
+
* Enable gradient scroll fade on the viewport edges.
|
|
3434
|
+
* @default false
|
|
3435
|
+
*/
|
|
3436
|
+
scrollFade?: boolean;
|
|
3437
|
+
};
|
|
3438
|
+
type ScrollAreaContentProps = react__default.ComponentProps<typeof ScrollArea$1.Content>;
|
|
3439
|
+
type ScrollAreaScrollbarProps = react__default.ComponentProps<typeof ScrollArea$1.Scrollbar>;
|
|
3440
|
+
type ScrollAreaThumbProps = react__default.ComponentProps<typeof ScrollArea$1.Thumb>;
|
|
3441
|
+
type ScrollAreaCornerProps = react__default.ComponentProps<typeof ScrollArea$1.Corner>;
|
|
3442
|
+
declare const ScrollAreaRoot: {
|
|
3443
|
+
({ className, ...rest }: ScrollAreaRootProps): react_jsx_runtime.JSX.Element;
|
|
3444
|
+
displayName: string;
|
|
3445
|
+
};
|
|
3446
|
+
declare const ScrollAreaViewport: {
|
|
3447
|
+
({ className, scrollFade, ...rest }: ScrollAreaViewportProps): react_jsx_runtime.JSX.Element;
|
|
3448
|
+
displayName: string;
|
|
3449
|
+
};
|
|
3450
|
+
declare const ScrollAreaContent: {
|
|
3451
|
+
({ className, ...rest }: ScrollAreaContentProps): react_jsx_runtime.JSX.Element;
|
|
3452
|
+
displayName: string;
|
|
3453
|
+
};
|
|
3454
|
+
declare const ScrollAreaScrollbar: {
|
|
3455
|
+
({ className, ...rest }: ScrollAreaScrollbarProps): react_jsx_runtime.JSX.Element;
|
|
3456
|
+
displayName: string;
|
|
3457
|
+
};
|
|
3458
|
+
declare const ScrollAreaThumb: {
|
|
3459
|
+
({ className, ...rest }: ScrollAreaThumbProps): react_jsx_runtime.JSX.Element;
|
|
3460
|
+
displayName: string;
|
|
3461
|
+
};
|
|
3462
|
+
declare const ScrollAreaCorner: {
|
|
3463
|
+
({ className, ...rest }: ScrollAreaCornerProps): react_jsx_runtime.JSX.Element;
|
|
3464
|
+
displayName: string;
|
|
3465
|
+
};
|
|
3466
|
+
|
|
3467
|
+
interface ScrollAreaProps extends Omit<ScrollAreaRootProps, 'children'> {
|
|
3468
|
+
children?: ReactNode;
|
|
3469
|
+
contentProps?: Omit<ScrollAreaContentProps, 'children'>;
|
|
3470
|
+
corner?: boolean;
|
|
3471
|
+
cornerProps?: ScrollAreaCornerProps;
|
|
3472
|
+
scrollFade?: boolean;
|
|
3473
|
+
scrollbarProps?: Omit<ScrollAreaScrollbarProps, 'children'>;
|
|
3474
|
+
thumbProps?: ScrollAreaThumbProps;
|
|
3475
|
+
viewportProps?: Omit<ScrollAreaViewportProps, 'children' | 'scrollFade'>;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
declare const ScrollArea: FC<ScrollAreaProps>;
|
|
3479
|
+
|
|
3480
|
+
interface ScrollShadowProps extends FlexboxProps {
|
|
3481
|
+
hideScrollBar?: boolean;
|
|
3482
|
+
isEnabled?: boolean;
|
|
3483
|
+
offset?: number;
|
|
3484
|
+
onVisibilityChange?: (visibility: {
|
|
3485
|
+
bottom?: boolean;
|
|
3486
|
+
left?: boolean;
|
|
3487
|
+
right?: boolean;
|
|
3488
|
+
top?: boolean;
|
|
3489
|
+
}) => void;
|
|
3490
|
+
orientation?: 'vertical' | 'horizontal';
|
|
3491
|
+
ref?: Ref<HTMLDivElement>;
|
|
3492
|
+
size?: number;
|
|
3493
|
+
visibility?: 'auto' | 'always' | 'never';
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
declare const ScrollShadow: FC<ScrollShadowProps>;
|
|
3497
|
+
|
|
3498
|
+
interface SearchBarProps extends Omit<InputProps, 'styles' | 'classNames'> {
|
|
3499
|
+
classNames?: {
|
|
3500
|
+
input?: string;
|
|
3501
|
+
shortKey?: string;
|
|
3502
|
+
};
|
|
3503
|
+
defaultValue?: string;
|
|
3504
|
+
enableShortKey?: boolean;
|
|
3505
|
+
loading?: boolean;
|
|
3506
|
+
onInputChange?: (value: string) => void;
|
|
3507
|
+
onSearch?: (value: string) => void;
|
|
3508
|
+
shortKey?: string;
|
|
3509
|
+
spotlight?: boolean;
|
|
3510
|
+
styles?: {
|
|
3511
|
+
input?: CSSProperties;
|
|
3512
|
+
shortKey?: CSSProperties;
|
|
3513
|
+
};
|
|
3514
|
+
value?: string;
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
declare const SearchBar: react.NamedExoticComponent<SearchBarProps>;
|
|
3518
|
+
|
|
3519
|
+
interface SegmentedProps extends SegmentedProps$1 {
|
|
3520
|
+
glass?: boolean;
|
|
3521
|
+
iconProps?: Omit<IconProps$1, 'icon'>;
|
|
3522
|
+
padding?: string | number;
|
|
3523
|
+
ref?: Ref<HTMLDivElement>;
|
|
3524
|
+
shadow?: boolean;
|
|
3525
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
declare const Segmented: react.NamedExoticComponent<SegmentedProps>;
|
|
3529
|
+
|
|
3530
|
+
interface SelectProps extends Omit<SelectProps$1, 'suffixIcon'> {
|
|
3531
|
+
ref?: Ref<RefSelectProps>;
|
|
3532
|
+
shadow?: boolean;
|
|
3533
|
+
suffixIcon?: IconProps$1['icon'];
|
|
3534
|
+
suffixIconProps?: Omit<IconProps$1, 'icon'>;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
/**
|
|
3538
|
+
* @deprecated Use `LobeSelect` instead.
|
|
3539
|
+
*/
|
|
3540
|
+
declare const Select: react.NamedExoticComponent<SelectProps>;
|
|
3541
|
+
|
|
3542
|
+
interface SideNavProps extends FlexboxProps {
|
|
3543
|
+
avatar?: ReactNode;
|
|
3544
|
+
bottomActions: ReactNode;
|
|
3545
|
+
topActions?: ReactNode;
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
declare const SideNav: react.NamedExoticComponent<SideNavProps>;
|
|
3549
|
+
|
|
3550
|
+
interface SkeletonBlockProps {
|
|
3551
|
+
active?: boolean;
|
|
3552
|
+
className?: string;
|
|
3553
|
+
height?: number | string;
|
|
3554
|
+
style?: CSSProperties;
|
|
3555
|
+
width?: number | string;
|
|
3556
|
+
}
|
|
3557
|
+
interface SkeletonTitleProps extends Omit<SkeletonBlockProps, 'height'> {
|
|
3558
|
+
fontSize?: number;
|
|
3559
|
+
height?: number;
|
|
3560
|
+
lineHeight?: number;
|
|
3561
|
+
width?: number | string;
|
|
3562
|
+
}
|
|
3563
|
+
interface SkeletonParagraphProps extends Omit<SkeletonBlockProps, 'width' | 'height'> {
|
|
3564
|
+
fontSize?: number;
|
|
3565
|
+
gap?: number;
|
|
3566
|
+
height?: number;
|
|
3567
|
+
lineHeight?: number;
|
|
3568
|
+
rows?: number;
|
|
3569
|
+
width?: number | string | (number | string)[];
|
|
3570
|
+
}
|
|
3571
|
+
interface SkeletonTagsProps extends Omit<SkeletonBlockProps, 'width'> {
|
|
3572
|
+
count?: number;
|
|
3573
|
+
gap?: number;
|
|
3574
|
+
size?: 'small' | 'middle' | 'large';
|
|
3575
|
+
width?: number | string | (number | string)[];
|
|
3576
|
+
}
|
|
3577
|
+
interface SkeletonAvatarProps extends SkeletonBlockProps {
|
|
3578
|
+
shape?: 'circle' | 'square';
|
|
3579
|
+
size?: number | string;
|
|
3580
|
+
}
|
|
3581
|
+
interface SkeletonButtonProps extends SkeletonBlockProps {
|
|
3582
|
+
block?: boolean;
|
|
3583
|
+
shape?: 'circle' | 'round' | 'default';
|
|
3584
|
+
size?: 'large' | 'small' | 'default';
|
|
3585
|
+
}
|
|
3586
|
+
interface SkeletonProps extends SkeletonBlockProps {
|
|
3587
|
+
avatar?: SkeletonAvatarProps | boolean;
|
|
3588
|
+
classNames?: {
|
|
3589
|
+
avatar?: string;
|
|
3590
|
+
paragraph?: string;
|
|
3591
|
+
root?: string;
|
|
3592
|
+
title?: string;
|
|
3593
|
+
};
|
|
3594
|
+
gap?: number;
|
|
3595
|
+
paragraph?: SkeletonParagraphProps | boolean;
|
|
3596
|
+
styles?: {
|
|
3597
|
+
avatar?: CSSProperties;
|
|
3598
|
+
paragraph?: CSSProperties;
|
|
3599
|
+
root?: CSSProperties;
|
|
3600
|
+
title?: CSSProperties;
|
|
3601
|
+
};
|
|
3602
|
+
title?: SkeletonTitleProps | boolean;
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
declare const SkeletonAvatar: FC<SkeletonAvatarProps>;
|
|
3606
|
+
|
|
3607
|
+
declare const SkeletonBlock: FC<SkeletonBlockProps>;
|
|
3608
|
+
|
|
3609
|
+
declare const SkeletonButton: FC<SkeletonButtonProps>;
|
|
3610
|
+
|
|
3611
|
+
declare const SkeletonParagraph: FC<SkeletonParagraphProps>;
|
|
3612
|
+
|
|
3613
|
+
declare const SkeletonTags: FC<SkeletonTagsProps>;
|
|
3614
|
+
|
|
3615
|
+
declare const SkeletonTitle: FC<SkeletonTitleProps>;
|
|
3616
|
+
|
|
3617
|
+
interface ISkeleton {
|
|
3618
|
+
(props: SkeletonProps): ReactNode;
|
|
3619
|
+
Avatar: typeof SkeletonAvatar;
|
|
3620
|
+
Block: typeof SkeletonBlock;
|
|
3621
|
+
Button: typeof SkeletonButton;
|
|
3622
|
+
Paragraph: typeof SkeletonParagraph;
|
|
3623
|
+
Tags: typeof SkeletonTags;
|
|
3624
|
+
Title: typeof SkeletonTitle;
|
|
3625
|
+
}
|
|
3626
|
+
declare const Skeleton: ISkeleton;
|
|
3627
|
+
|
|
3628
|
+
interface SliderWithInputProps extends Omit<SliderSingleProps, 'classNames' | 'styles'> {
|
|
3629
|
+
changeOnWheel?: boolean;
|
|
3630
|
+
classNames?: {
|
|
3631
|
+
input?: string;
|
|
3632
|
+
slider?: string;
|
|
3633
|
+
} & SliderSingleProps['classNames'];
|
|
3634
|
+
controls?: InputNumberProps['controls'];
|
|
3635
|
+
gap?: FlexboxProps['gap'];
|
|
3636
|
+
size?: InputNumberProps['size'];
|
|
3637
|
+
styles?: {
|
|
3638
|
+
input?: CSSProperties;
|
|
3639
|
+
slider?: CSSProperties;
|
|
3640
|
+
} & SliderSingleProps['styles'];
|
|
3641
|
+
unlimitedInput?: boolean;
|
|
3642
|
+
variant?: InputNumberProps['variant'];
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
declare const SliderWithInput: react.NamedExoticComponent<SliderWithInputProps>;
|
|
3646
|
+
|
|
3647
|
+
declare const DragHandle: react.NamedExoticComponent<ActionIconProps>;
|
|
3648
|
+
|
|
3649
|
+
interface SortableItemProps extends Omit<FlexboxProps, 'id'> {
|
|
3650
|
+
id: string | number;
|
|
3651
|
+
variant?: 'borderless' | 'filled' | 'outlined';
|
|
3652
|
+
}
|
|
3653
|
+
declare const SortableItem: react.NamedExoticComponent<SortableItemProps>;
|
|
3654
|
+
|
|
3655
|
+
interface SortableListItem {
|
|
3656
|
+
[key: string]: any;
|
|
3657
|
+
id: string | number;
|
|
3658
|
+
}
|
|
3659
|
+
interface SortableListProps extends Omit<FlexboxProps, 'onChange'> {
|
|
3660
|
+
items: SortableListItem[];
|
|
3661
|
+
onChange(items: SortableListItem[]): void;
|
|
3662
|
+
ref?: Ref<HTMLUListElement>;
|
|
3663
|
+
renderItem(item: SortableListItem): ReactNode;
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
interface ISortableList {
|
|
3667
|
+
(props: SortableListProps): ReactNode;
|
|
3668
|
+
DragHandle: typeof DragHandle;
|
|
3669
|
+
Item: typeof SortableItem;
|
|
3670
|
+
}
|
|
3671
|
+
declare const SortableList: ISortableList;
|
|
3672
|
+
|
|
3673
|
+
declare const primaryColors: {
|
|
3674
|
+
blue: string;
|
|
3675
|
+
cyan: string;
|
|
3676
|
+
geekblue: string;
|
|
3677
|
+
gold: string;
|
|
3678
|
+
green: string;
|
|
3679
|
+
lime: string;
|
|
3680
|
+
magenta: string;
|
|
3681
|
+
orange: string;
|
|
3682
|
+
purple: string;
|
|
3683
|
+
red: string;
|
|
3684
|
+
volcano: string;
|
|
3685
|
+
yellow: string;
|
|
3686
|
+
};
|
|
3687
|
+
type PrimaryColorsObj = typeof primaryColors;
|
|
3688
|
+
type PrimaryColors = keyof PrimaryColorsObj;
|
|
3689
|
+
declare const primaryColorsSwatches: string[];
|
|
3690
|
+
declare const neutralColors: {
|
|
3691
|
+
mauve: string;
|
|
3692
|
+
olive: string;
|
|
3693
|
+
sage: string;
|
|
3694
|
+
sand: string;
|
|
3695
|
+
slate: string;
|
|
3696
|
+
};
|
|
3697
|
+
declare const neutralColorsSwatches: string[];
|
|
3698
|
+
type NeutralColorsObj = typeof neutralColors;
|
|
3699
|
+
type NeutralColors = keyof NeutralColorsObj;
|
|
3700
|
+
declare const findCustomThemeName: (type: "primary" | "neutral", value: string) => string | undefined;
|
|
3701
|
+
|
|
3702
|
+
declare const generateCustomStylish: GetCustomStylish<LobeCustomStylish>;
|
|
3703
|
+
|
|
3704
|
+
declare const staticStylish: LobeCustomStylish;
|
|
3705
|
+
|
|
3706
|
+
declare const generateCustomToken: GetCustomToken<LobeCustomToken>;
|
|
3707
|
+
|
|
3708
|
+
type colorStep = [
|
|
3709
|
+
string,
|
|
3710
|
+
string,
|
|
3711
|
+
string,
|
|
3712
|
+
string,
|
|
3713
|
+
string,
|
|
3714
|
+
string,
|
|
3715
|
+
string,
|
|
3716
|
+
string,
|
|
3717
|
+
string,
|
|
3718
|
+
string,
|
|
3719
|
+
string,
|
|
3720
|
+
string,
|
|
3721
|
+
string
|
|
3722
|
+
];
|
|
3723
|
+
interface ColorScaleItem {
|
|
3724
|
+
dark: colorStep;
|
|
3725
|
+
darkA: colorStep;
|
|
3726
|
+
light: colorStep;
|
|
3727
|
+
lightA: colorStep;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
declare const generateColorPalette: ({ type, scale, appearance, }: {
|
|
3731
|
+
appearance: "light" | "dark";
|
|
3732
|
+
scale: ColorScaleItem;
|
|
3733
|
+
type: "Primary" | "Success" | "Warning" | "Error" | "Info" | string;
|
|
3734
|
+
}) => Partial<AliasToken>;
|
|
3735
|
+
declare const generateColorNeutralPalette: ({ scale, appearance, }: {
|
|
3736
|
+
appearance: "light" | "dark";
|
|
3737
|
+
scale: ColorScaleItem;
|
|
3738
|
+
}) => Partial<AliasToken>;
|
|
3739
|
+
|
|
3740
|
+
declare const CLASSNAMES: {
|
|
3741
|
+
ContextTrigger: string;
|
|
3742
|
+
DropdownMenuTrigger: string;
|
|
3743
|
+
};
|
|
3744
|
+
|
|
3745
|
+
declare const LOBE_THEME_APP_ID = "lobe-ui-theme-app";
|
|
3746
|
+
|
|
3747
|
+
interface ThemeProviderProps extends ThemeProviderProps$1<any> {
|
|
3748
|
+
className?: string;
|
|
3749
|
+
customFonts?: string[];
|
|
3750
|
+
customStylish?: (theme: CustomStylishParams) => {
|
|
3751
|
+
[key: string]: any;
|
|
3752
|
+
};
|
|
3753
|
+
customTheme?: {
|
|
3754
|
+
neutralColor?: NeutralColors;
|
|
3755
|
+
primaryColor?: PrimaryColors;
|
|
3756
|
+
};
|
|
3757
|
+
customToken?: (theme: CustomTokenParams) => {
|
|
3758
|
+
[key: string]: any;
|
|
3759
|
+
};
|
|
3760
|
+
enableCustomFonts?: boolean;
|
|
3761
|
+
enableGlobalStyle?: boolean;
|
|
3762
|
+
style?: CSSProperties;
|
|
3763
|
+
}
|
|
3764
|
+
interface MetaProps {
|
|
3765
|
+
description?: string;
|
|
3766
|
+
title?: string;
|
|
3767
|
+
withManifest?: boolean;
|
|
3768
|
+
}
|
|
3769
|
+
|
|
3770
|
+
declare const Meta: FC<MetaProps>;
|
|
3771
|
+
|
|
3772
|
+
declare const ThemeProvider: react.NamedExoticComponent<ThemeProviderProps>;
|
|
3773
|
+
|
|
3774
|
+
interface ThemeSwitchProps extends DivProps$1 {
|
|
3775
|
+
labels?: {
|
|
3776
|
+
auto: string;
|
|
3777
|
+
dark: string;
|
|
3778
|
+
light: string;
|
|
3779
|
+
};
|
|
3780
|
+
onThemeSwitch: (themeMode: ThemeMode) => void;
|
|
3781
|
+
size?: ActionIconProps['size'];
|
|
3782
|
+
themeMode: ThemeMode;
|
|
3783
|
+
type?: 'icon' | 'select';
|
|
3784
|
+
variant?: ActionIconProps['variant'];
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
declare const ThemeSwitch: FC<ThemeSwitchProps>;
|
|
3788
|
+
|
|
3789
|
+
type ToastType = 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default';
|
|
3790
|
+
type ToastPosition = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
|
|
3791
|
+
type ToastActionVariant = 'primary' | 'secondary' | 'text' | 'danger' | 'ghost';
|
|
3792
|
+
interface ToastAction {
|
|
3793
|
+
/**
|
|
3794
|
+
* Action button label
|
|
3795
|
+
*/
|
|
3796
|
+
label: ReactNode;
|
|
3797
|
+
/**
|
|
3798
|
+
* Click handler
|
|
3799
|
+
*/
|
|
3800
|
+
onClick?: () => void;
|
|
3801
|
+
/**
|
|
3802
|
+
* Additional props for the button
|
|
3803
|
+
*/
|
|
3804
|
+
props?: Omit<React.ComponentPropsWithRef<'button'>, 'onClick'>;
|
|
3805
|
+
/**
|
|
3806
|
+
* Button variant
|
|
3807
|
+
* @default 'primary'
|
|
3808
|
+
*/
|
|
3809
|
+
variant?: ToastActionVariant;
|
|
3810
|
+
}
|
|
3811
|
+
interface ToastOptions {
|
|
3812
|
+
/**
|
|
3813
|
+
* Action button props
|
|
3814
|
+
* @deprecated Use `actions` instead
|
|
3815
|
+
*/
|
|
3816
|
+
actionProps?: React.ComponentPropsWithRef<'button'>;
|
|
3817
|
+
/**
|
|
3818
|
+
* Multiple action buttons
|
|
3819
|
+
*/
|
|
3820
|
+
actions?: ToastAction[];
|
|
3821
|
+
/**
|
|
3822
|
+
* Additional class name
|
|
3823
|
+
*/
|
|
3824
|
+
className?: string;
|
|
3825
|
+
/**
|
|
3826
|
+
* Whether the toast is closable
|
|
3827
|
+
* @default true
|
|
3828
|
+
*/
|
|
3829
|
+
closable?: boolean;
|
|
3830
|
+
/**
|
|
3831
|
+
* Custom data for the toast
|
|
3832
|
+
*/
|
|
3833
|
+
data?: Record<string, unknown>;
|
|
3834
|
+
/**
|
|
3835
|
+
* Toast description
|
|
3836
|
+
*/
|
|
3837
|
+
description?: ReactNode;
|
|
3838
|
+
/**
|
|
3839
|
+
* Custom duration in milliseconds
|
|
3840
|
+
* @default 5000
|
|
3841
|
+
*/
|
|
3842
|
+
duration?: number;
|
|
3843
|
+
/**
|
|
3844
|
+
* Hide the close button
|
|
3845
|
+
* @default false
|
|
3846
|
+
*/
|
|
3847
|
+
hideCloseButton?: boolean;
|
|
3848
|
+
/**
|
|
3849
|
+
* Custom icon
|
|
3850
|
+
*/
|
|
3851
|
+
icon?: IconProps$1['icon'];
|
|
3852
|
+
/**
|
|
3853
|
+
* Callback when toast is closed
|
|
3854
|
+
*/
|
|
3855
|
+
onClose?: () => void;
|
|
3856
|
+
/**
|
|
3857
|
+
* Callback when toast is removed
|
|
3858
|
+
*/
|
|
3859
|
+
onRemove?: () => void;
|
|
3860
|
+
/**
|
|
3861
|
+
* Toast placement, overrides global ToastHost position
|
|
3862
|
+
*/
|
|
3863
|
+
placement?: ToastPosition;
|
|
3864
|
+
/**
|
|
3865
|
+
* Additional styles
|
|
3866
|
+
*/
|
|
3867
|
+
style?: CSSProperties;
|
|
3868
|
+
/**
|
|
3869
|
+
* Toast title
|
|
3870
|
+
*/
|
|
3871
|
+
title?: ReactNode;
|
|
3872
|
+
/**
|
|
3873
|
+
* Toast type
|
|
3874
|
+
* @default 'default'
|
|
3875
|
+
*/
|
|
3876
|
+
type?: ToastType;
|
|
3877
|
+
}
|
|
3878
|
+
interface ToastInstance {
|
|
3879
|
+
/**
|
|
3880
|
+
* Close the toast
|
|
3881
|
+
*/
|
|
3882
|
+
close: () => void;
|
|
3883
|
+
/**
|
|
3884
|
+
* The toast ID
|
|
3885
|
+
*/
|
|
3886
|
+
id: string;
|
|
3887
|
+
/**
|
|
3888
|
+
* Update the toast
|
|
3889
|
+
*/
|
|
3890
|
+
update: (options: Partial<ToastOptions>) => void;
|
|
3891
|
+
}
|
|
3892
|
+
interface ToastProps {
|
|
3893
|
+
classNames?: {
|
|
3894
|
+
action?: string;
|
|
3895
|
+
actions?: string;
|
|
3896
|
+
close?: string;
|
|
3897
|
+
content?: string;
|
|
3898
|
+
description?: string;
|
|
3899
|
+
icon?: string;
|
|
3900
|
+
root?: string;
|
|
3901
|
+
title?: string;
|
|
3902
|
+
};
|
|
3903
|
+
styles?: {
|
|
3904
|
+
action?: CSSProperties;
|
|
3905
|
+
actions?: CSSProperties;
|
|
3906
|
+
close?: CSSProperties;
|
|
3907
|
+
content?: CSSProperties;
|
|
3908
|
+
description?: CSSProperties;
|
|
3909
|
+
icon?: CSSProperties;
|
|
3910
|
+
root?: CSSProperties;
|
|
3911
|
+
title?: CSSProperties;
|
|
3912
|
+
};
|
|
3913
|
+
toast: Toast.Root.ToastObject<ToastOptions>;
|
|
3914
|
+
}
|
|
3915
|
+
interface ToastPromiseOptions<T> {
|
|
3916
|
+
error: ReactNode | ((error: Error) => ReactNode) | Omit<ToastOptions, 'type'>;
|
|
3917
|
+
loading: ReactNode | Omit<ToastOptions, 'type'>;
|
|
3918
|
+
success: ReactNode | ((data: T) => ReactNode) | Omit<ToastOptions, 'type'>;
|
|
3919
|
+
}
|
|
3920
|
+
interface ToastAPI {
|
|
3921
|
+
(options: ToastOptions): ToastInstance;
|
|
3922
|
+
dismiss: (id?: string) => void;
|
|
3923
|
+
error: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
|
|
3924
|
+
info: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
|
|
3925
|
+
loading: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
|
|
3926
|
+
promise: <T>(promise: Promise<T>, options: ToastPromiseOptions<T>) => Promise<T>;
|
|
3927
|
+
success: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
|
|
3928
|
+
warning: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
|
|
3929
|
+
}
|
|
3930
|
+
|
|
3931
|
+
declare const toast: ToastAPI;
|
|
3932
|
+
interface ToastHostProps {
|
|
3933
|
+
className?: string;
|
|
3934
|
+
/**
|
|
3935
|
+
* Default duration for toasts
|
|
3936
|
+
* @default 5000
|
|
3937
|
+
*/
|
|
3938
|
+
duration?: number;
|
|
3939
|
+
/**
|
|
3940
|
+
* Maximum number of toasts
|
|
3941
|
+
* @default 5
|
|
3942
|
+
*/
|
|
3943
|
+
limit?: number;
|
|
3944
|
+
/**
|
|
3945
|
+
* Toast position
|
|
3946
|
+
* @default 'bottom-right'
|
|
3947
|
+
*/
|
|
3948
|
+
position?: ToastPosition;
|
|
3949
|
+
/**
|
|
3950
|
+
* Root element for portal
|
|
3951
|
+
*/
|
|
3952
|
+
root?: HTMLElement | ShadowRoot | null;
|
|
3953
|
+
/**
|
|
3954
|
+
* Swipe direction to dismiss
|
|
3955
|
+
* @default ['down', 'right']
|
|
3956
|
+
*/
|
|
3957
|
+
swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];
|
|
3958
|
+
}
|
|
3959
|
+
declare const ToastHost: react.MemoExoticComponent<({ root, className, duration, limit, position, swipeDirection, }: ToastHostProps) => react.ReactPortal | null>;
|
|
3960
|
+
declare const useToast: () => ToastAPI;
|
|
3961
|
+
|
|
3962
|
+
interface TocItemType {
|
|
3963
|
+
children?: TocItemType[];
|
|
3964
|
+
id: string;
|
|
3965
|
+
title: string;
|
|
3966
|
+
}
|
|
3967
|
+
interface TocMobileProps {
|
|
3968
|
+
activeKey?: string;
|
|
3969
|
+
getContainer?: AnchorProps['getContainer'];
|
|
3970
|
+
headerHeight?: number;
|
|
3971
|
+
items: TocItemType[];
|
|
3972
|
+
onChange?: (activeKey: string) => void;
|
|
3973
|
+
tocWidth?: number;
|
|
3974
|
+
}
|
|
3975
|
+
interface TocProps extends TocMobileProps {
|
|
3976
|
+
isMobile?: boolean;
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
declare const Toc: react.NamedExoticComponent<TocProps>;
|
|
3980
|
+
|
|
3981
|
+
declare const copyToClipboard: (text: string) => Promise<void>;
|
|
3982
|
+
|
|
3983
|
+
declare const preventDefault: <T extends {
|
|
3984
|
+
preventDefault: () => void;
|
|
3985
|
+
}>(event: T) => void;
|
|
3986
|
+
declare const stopPropagation: <T extends {
|
|
3987
|
+
stopPropagation: () => void;
|
|
3988
|
+
}>(event: T) => void;
|
|
3989
|
+
declare const preventDefaultAndStopPropagation: <T extends {
|
|
3990
|
+
preventBaseUIHandler?: () => void;
|
|
3991
|
+
preventDefault: () => void;
|
|
3992
|
+
stopPropagation: () => void;
|
|
3993
|
+
}>(event: T) => void;
|
|
3994
|
+
|
|
3995
|
+
declare const _default: {
|
|
3996
|
+
displayName: string;
|
|
3997
|
+
name: string;
|
|
3998
|
+
semanticHighlighting: boolean;
|
|
3999
|
+
tokenColors: ({
|
|
4000
|
+
settings: {
|
|
4001
|
+
foreground: string;
|
|
4002
|
+
fontStyle?: undefined;
|
|
4003
|
+
background?: undefined;
|
|
4004
|
+
};
|
|
4005
|
+
scope?: undefined;
|
|
4006
|
+
} | {
|
|
4007
|
+
scope: string;
|
|
4008
|
+
settings: {
|
|
4009
|
+
foreground: string;
|
|
4010
|
+
fontStyle?: undefined;
|
|
4011
|
+
background?: undefined;
|
|
4012
|
+
};
|
|
4013
|
+
} | {
|
|
4014
|
+
scope: string;
|
|
4015
|
+
settings: {
|
|
4016
|
+
fontStyle: string;
|
|
4017
|
+
foreground: string;
|
|
4018
|
+
background?: undefined;
|
|
4019
|
+
};
|
|
4020
|
+
} | {
|
|
4021
|
+
settings: {
|
|
4022
|
+
background: string;
|
|
4023
|
+
foreground: string;
|
|
4024
|
+
fontStyle?: undefined;
|
|
4025
|
+
};
|
|
4026
|
+
scope?: undefined;
|
|
4027
|
+
} | {
|
|
4028
|
+
scope: string[];
|
|
4029
|
+
settings: {
|
|
4030
|
+
foreground: string;
|
|
4031
|
+
fontStyle?: undefined;
|
|
4032
|
+
background?: undefined;
|
|
4033
|
+
};
|
|
4034
|
+
} | {
|
|
4035
|
+
scope: string[];
|
|
4036
|
+
settings: {
|
|
4037
|
+
fontStyle: string;
|
|
4038
|
+
foreground?: undefined;
|
|
4039
|
+
background?: undefined;
|
|
4040
|
+
};
|
|
4041
|
+
} | {
|
|
4042
|
+
scope: string[];
|
|
4043
|
+
settings: {
|
|
4044
|
+
fontStyle: string;
|
|
4045
|
+
foreground: string;
|
|
4046
|
+
background?: undefined;
|
|
4047
|
+
};
|
|
4048
|
+
})[];
|
|
4049
|
+
type: string;
|
|
4050
|
+
};
|
|
4051
|
+
|
|
4052
|
+
export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DROPDOWN_MENU_CONTAINER_ATTR, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps$1 as DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, EditorSlashMenuGroup$1 as EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, FileTypeIcon, type FileTypeIconProps, _default$9 as FlexBasic, type FlexBasicProps, _default$9 as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, I18nProvider, type I18nProviderProps, Icon, type IconProps$1 as IconProps, IconProvider, type IconSize, Image, type ImageProps$1 as ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_SELECT_CONTAINER_ATTR, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, LobeSelect, LobeSelectArrow, type LobeSelectArrowProps, LobeSelectBackdrop, LobeSelectGroup, LobeSelectGroupLabel, type LobeSelectGroupLabelProps, type LobeSelectGroupProps, LobeSelectIcon, type LobeSelectIconProps, LobeSelectItem, LobeSelectItemIndicator, type LobeSelectItemIndicatorProps, type LobeSelectItemProps, LobeSelectItemText, type LobeSelectItemTextProps, LobeSelectList, type LobeSelectListProps, LobeSelectPopup, type LobeSelectPopupProps, LobeSelectPortal, type LobeSelectPortalProps, LobeSelectPositioner, type LobeSelectPositionerProps, type LobeSelectProps, LobeSelectRoot, LobeSelectScrollDownArrow, type LobeSelectScrollDownArrowProps, LobeSelectScrollUpArrow, type LobeSelectScrollUpArrowProps, LobeSelectSeparator, LobeSelectTrigger, type LobeSelectTriggerProps, LobeSelectValue, type LobeSelectValueProps, LobeSwitch, type LobeSwitchChangeEventHandler, type LobeSwitchClassNames, type LobeSwitchClickEventHandler, type LobeSwitchContextType, LobeSwitchIcon, type LobeSwitchIconPosition, type LobeSwitchIconProps, type LobeSwitchProps, LobeSwitchRoot, type LobeSwitchRootProps, type LobeSwitchSize, type LobeSwitchStyles, LobeSwitchThumb, type LobeSwitchThumbProps, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, type NeutralColors, type NeutralColorsObj, POPOVER_CONTAINER_ATTR, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, type PrimaryColors, type PrimaryColorsObj, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Video, type VideoProps$1 as VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles$1 as lobeSwitchStyles, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useCdnFn, useLobeSwitchContext, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, useToast, useTranslation };
|