lingee-ui 0.0.9 → 0.0.10
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/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/chunk-45W5KD4T.js +2 -0
- package/dist/{chunk-QIMQMSJB.js → chunk-5RKADFB7.js} +1 -1
- package/dist/{chunk-6M7ESUQX.mjs → chunk-HI27RMCM.mjs} +1 -1
- package/dist/{chunk-XG3DE76O.mjs → chunk-HSJ3C3FP.mjs} +1 -1
- package/dist/chunk-HVFYR7UA.mjs +2 -0
- package/dist/chunk-LBNA6G3N.js +1 -0
- package/dist/chunk-MH2WNTQF.mjs +1 -0
- package/dist/chunk-N524EGAL.mjs +1 -0
- package/dist/chunk-TR5HCUR5.js +1 -0
- package/dist/{chunk-ZXUYGVWB.js → chunk-UXFCTPA5.js} +1 -1
- package/dist/{index-7pb5YOcq.d.mts → index-89atTLPD.d.mts} +2 -2
- package/dist/{index-7pb5YOcq.d.ts → index-89atTLPD.d.ts} +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.mts +217 -17
- package/dist/index.d.ts +217 -17
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/input/index.js +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/popover/index.css +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tree/index.css +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/tree/index.mjs +1 -1
- package/package.json +4 -1
- package/skill/AGENTS-SNIPPET.md +43 -7
- package/skill/SKILL.md +20 -12
- package/skill/VERSION.json +4 -4
- package/skill/references/components/carousel.md +93 -0
- package/skill/references/components/dropdown.md +50 -1
- package/skill/references/components/empty.md +3 -2
- package/skill/references/components/select.md +1 -0
- package/skill/references/components/sidebar.md +1 -1
- package/skill/references/components/upload.md +53 -1
- package/skill/references/icons.md +3 -2
- package/skill/references/setup.md +14 -2
- package/skill/references/tokens.md +41 -6
- package/dist/chunk-C5BDJQIO.js +0 -2
- package/dist/chunk-DIXO53WK.mjs +0 -1
- package/dist/chunk-H7GT6UT4.mjs +0 -1
- package/dist/chunk-IE7TAOTL.mjs +0 -2
- package/dist/chunk-M2SC5LED.js +0 -1
- package/dist/chunk-WAYZVZQB.js +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as ButtonProps } from './index-
|
|
2
|
-
export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-
|
|
1
|
+
import { B as ButtonProps } from './index-89atTLPD.mjs';
|
|
2
|
+
export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-89atTLPD.mjs';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
|
|
5
5
|
import { TooltipProps } from './tooltip/index.mjs';
|
|
@@ -84,6 +84,8 @@ declare const zhCN: {
|
|
|
84
84
|
Select: {
|
|
85
85
|
loading: string;
|
|
86
86
|
loadError: string;
|
|
87
|
+
/** 传入 onRetry 时使用:引导语由 Empty.Card 统一追加,此处不含「请重试」 */
|
|
88
|
+
loadFailed: string;
|
|
87
89
|
notFound: string;
|
|
88
90
|
clear: string;
|
|
89
91
|
};
|
|
@@ -97,6 +99,13 @@ declare const zhCN: {
|
|
|
97
99
|
scrollLeft: string;
|
|
98
100
|
scrollRight: string;
|
|
99
101
|
};
|
|
102
|
+
Carousel: {
|
|
103
|
+
carousel: string;
|
|
104
|
+
prev: string;
|
|
105
|
+
next: string;
|
|
106
|
+
/** {page} 为页码,从 1 开始 */
|
|
107
|
+
goToPage: string;
|
|
108
|
+
};
|
|
100
109
|
Form: {
|
|
101
110
|
/** {label} 为表单项名称 */
|
|
102
111
|
required: string;
|
|
@@ -172,6 +181,10 @@ declare const zhCN: {
|
|
|
172
181
|
Spin: {
|
|
173
182
|
loading: string;
|
|
174
183
|
};
|
|
184
|
+
Empty: {
|
|
185
|
+
/** 错误态传入 onRetry 后,固定追加在 description 之后的重试引导 */
|
|
186
|
+
retry: string;
|
|
187
|
+
};
|
|
175
188
|
};
|
|
176
189
|
|
|
177
190
|
/** 语言包类型,由 zh-CN 推导结构 */
|
|
@@ -196,6 +209,7 @@ declare const enUS: {
|
|
|
196
209
|
Select: {
|
|
197
210
|
loading: string;
|
|
198
211
|
loadError: string;
|
|
212
|
+
loadFailed: string;
|
|
199
213
|
notFound: string;
|
|
200
214
|
clear: string;
|
|
201
215
|
};
|
|
@@ -209,6 +223,12 @@ declare const enUS: {
|
|
|
209
223
|
scrollLeft: string;
|
|
210
224
|
scrollRight: string;
|
|
211
225
|
};
|
|
226
|
+
Carousel: {
|
|
227
|
+
carousel: string;
|
|
228
|
+
prev: string;
|
|
229
|
+
next: string;
|
|
230
|
+
goToPage: string;
|
|
231
|
+
};
|
|
212
232
|
Form: {
|
|
213
233
|
required: string;
|
|
214
234
|
requiredNoLabel: string;
|
|
@@ -282,6 +302,9 @@ declare const enUS: {
|
|
|
282
302
|
Spin: {
|
|
283
303
|
loading: string;
|
|
284
304
|
};
|
|
305
|
+
Empty: {
|
|
306
|
+
retry: string;
|
|
307
|
+
};
|
|
285
308
|
};
|
|
286
309
|
|
|
287
310
|
/**
|
|
@@ -503,8 +526,14 @@ interface SelectProps<T = string> {
|
|
|
503
526
|
onSearch?: (keyword: string) => void;
|
|
504
527
|
/** 加载中状态(远程搜索时展示 loading) */
|
|
505
528
|
loading?: boolean;
|
|
506
|
-
/**
|
|
529
|
+
/** 加载失败状态(下拉面板展示加载失败缺省) */
|
|
507
530
|
loadError?: boolean;
|
|
531
|
+
/**
|
|
532
|
+
* 加载失败后的重试回调。
|
|
533
|
+
* 传入后 loadError 缺省态可点击,并在文案后追加「重试」;
|
|
534
|
+
* 不传则为纯提示(此时 loadError 文案自带「请重试」引导)
|
|
535
|
+
*/
|
|
536
|
+
onRetry?: () => void;
|
|
508
537
|
/** 禁用 */
|
|
509
538
|
disabled?: boolean;
|
|
510
539
|
/** 错误态 */
|
|
@@ -541,6 +570,20 @@ declare const Select: <T = string>(props: SelectProps<T> & {
|
|
|
541
570
|
ref?: React__default.Ref<HTMLDivElement>;
|
|
542
571
|
}) => React__default.ReactElement | null;
|
|
543
572
|
|
|
573
|
+
/**
|
|
574
|
+
* 菜单项文本的溢出提示开关。
|
|
575
|
+
*
|
|
576
|
+
* 不传时行为与此前完全一致(文本撑开面板,不打点也不弹提示)。
|
|
577
|
+
* 传入后文本带默认最大宽度并单行截断,**仅在真正被截断时**悬浮显示完整内容,
|
|
578
|
+
* 未截断不弹(由 EllipsisTooltip 在 hover 时实时测量决定)。
|
|
579
|
+
*
|
|
580
|
+
* - `true`:取 `label` / `children` 作为提示内容。内容为 JSX 时会整块塞进浮层,
|
|
581
|
+
* 这类场景应显式传 ReactNode 指定纯文本
|
|
582
|
+
* - `ReactNode`:以其作为提示内容
|
|
583
|
+
*
|
|
584
|
+
* 最大宽度默认 240px,可通过 `--lg-dropdown-label-max-width` 覆盖。
|
|
585
|
+
*/
|
|
586
|
+
type DropdownEllipsisTooltip = boolean | ReactNode;
|
|
544
587
|
interface DropdownMenuItemData {
|
|
545
588
|
type?: "item";
|
|
546
589
|
/** 唯一标识 */
|
|
@@ -557,6 +600,8 @@ interface DropdownMenuItemData {
|
|
|
557
600
|
disabled?: boolean;
|
|
558
601
|
/** 选中回调 */
|
|
559
602
|
onSelect?: (event: Event) => void;
|
|
603
|
+
/** 文本溢出时悬浮显示完整内容,详见 DropdownEllipsisTooltip */
|
|
604
|
+
ellipsisTooltip?: DropdownEllipsisTooltip;
|
|
560
605
|
}
|
|
561
606
|
interface DropdownSeparatorData {
|
|
562
607
|
type: "separator";
|
|
@@ -680,6 +725,8 @@ interface DropdownItemProps {
|
|
|
680
725
|
selected?: boolean;
|
|
681
726
|
/** 选中回调,调用 event.preventDefault() 可阻止面板自动关闭 */
|
|
682
727
|
onSelect?: (event: Event) => void;
|
|
728
|
+
/** 文本溢出时悬浮显示完整内容,详见 DropdownEllipsisTooltip */
|
|
729
|
+
ellipsisTooltip?: DropdownEllipsisTooltip;
|
|
683
730
|
}
|
|
684
731
|
interface DropdownCheckboxItemProps {
|
|
685
732
|
/** 菜单项内容 */
|
|
@@ -694,6 +741,8 @@ interface DropdownCheckboxItemProps {
|
|
|
694
741
|
icon?: ReactNode;
|
|
695
742
|
/** 选中状态变化回调 */
|
|
696
743
|
onCheckedChange?: (checked: boolean) => void;
|
|
744
|
+
/** 文本溢出时悬浮显示完整内容,详见 DropdownEllipsisTooltip */
|
|
745
|
+
ellipsisTooltip?: DropdownEllipsisTooltip;
|
|
697
746
|
}
|
|
698
747
|
interface DropdownRadioGroupProps {
|
|
699
748
|
/** 子元素(DropdownRadioItem) */
|
|
@@ -714,6 +763,8 @@ interface DropdownRadioItemProps {
|
|
|
714
763
|
disabled?: boolean;
|
|
715
764
|
/** 前置图标 */
|
|
716
765
|
icon?: ReactNode;
|
|
766
|
+
/** 文本溢出时悬浮显示完整内容,详见 DropdownEllipsisTooltip */
|
|
767
|
+
ellipsisTooltip?: DropdownEllipsisTooltip;
|
|
717
768
|
}
|
|
718
769
|
interface DropdownLabelProps {
|
|
719
770
|
/** 标题内容 */
|
|
@@ -753,10 +804,20 @@ interface DropdownSubTriggerProps {
|
|
|
753
804
|
* 用于「展开时才拉取数据」这类懒加载场景
|
|
754
805
|
*/
|
|
755
806
|
onMouseEnter?: React__default.MouseEventHandler<HTMLDivElement>;
|
|
807
|
+
/** 文本溢出时悬浮显示完整内容,详见 DropdownEllipsisTooltip */
|
|
808
|
+
ellipsisTooltip?: DropdownEllipsisTooltip;
|
|
756
809
|
}
|
|
757
810
|
interface DropdownSubContentProps extends Pick<PopoverContentProps, "side" | "align" | "sideOffset" | "alignOffset" | "className" | "collisionPadding" | "container"> {
|
|
758
811
|
/** 子菜单面板内容 */
|
|
759
812
|
children: ReactNode;
|
|
813
|
+
/**
|
|
814
|
+
* 面板自定义样式
|
|
815
|
+
* - maxHeight: 面板高度上限,超出时内置 ScrollArea 滚动。
|
|
816
|
+
* 不传时仅以视口可用空间为界(子菜单承载的内容形态差异大,
|
|
817
|
+
* 统一给固定上限会截断设计高度更大的自定义面板)
|
|
818
|
+
* - width / minWidth 等其它 CSS 属性均可使用
|
|
819
|
+
*/
|
|
820
|
+
style?: CSSProperties;
|
|
760
821
|
}
|
|
761
822
|
interface DropdownButtonProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
762
823
|
/** 按钮文本内容 */
|
|
@@ -1213,22 +1274,33 @@ interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
|
1213
1274
|
*/
|
|
1214
1275
|
type EmptyCardStatus = "loading" | "empty" | "error";
|
|
1215
1276
|
/**
|
|
1216
|
-
*
|
|
1217
|
-
* - block:
|
|
1218
|
-
* - inline:
|
|
1277
|
+
* 密度形态。仅影响留白,图标与文字尺寸由 size 决定。
|
|
1278
|
+
* - block: 区块级占位,留白按 spacing 档位给足
|
|
1279
|
+
* - inline: 行内轻量提示(如「加载更多」),上下留白收紧、左右补 12px
|
|
1219
1280
|
*/
|
|
1220
1281
|
type EmptyCardVariant = "block" | "inline";
|
|
1221
1282
|
/** 上下留白档位 */
|
|
1222
1283
|
type EmptyCardSpacing = "none" | "normal" | "loose";
|
|
1223
|
-
interface EmptyCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onClick"> {
|
|
1284
|
+
interface EmptyCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onClick" | "size"> {
|
|
1224
1285
|
status: EmptyCardStatus;
|
|
1225
1286
|
/** 描述文案。组件不内置文案,由消费方传入 */
|
|
1226
1287
|
description: ReactNode;
|
|
1227
1288
|
/** 覆盖默认图标;传 null 则不渲染图标 */
|
|
1228
1289
|
icon?: ReactNode | null;
|
|
1290
|
+
/**
|
|
1291
|
+
* 尺寸,默认 "sm"。语义与 Empty 的 size 一致,内部直接透传:
|
|
1292
|
+
* - sm: 图标 16px + 文字 12px,横向排列(占位场景默认值)
|
|
1293
|
+
* - md: 图标 24px + 文字 14px,纵向排列
|
|
1294
|
+
* - lg: 图标 56px + 文字 16px,纵向排列
|
|
1295
|
+
*/
|
|
1296
|
+
size?: EmptySize;
|
|
1229
1297
|
variant?: EmptyCardVariant;
|
|
1230
1298
|
spacing?: EmptyCardSpacing;
|
|
1231
|
-
/**
|
|
1299
|
+
/**
|
|
1300
|
+
* 重试回调。仅 status="error" 时生效。
|
|
1301
|
+
* 传入后整体渲染为可点击按钮:带浅色底 + hover 反馈,
|
|
1302
|
+
* 并在 description 之后自动追加主题色「重试」(文案取自 locale,无需消费方拼接)
|
|
1303
|
+
*/
|
|
1232
1304
|
onRetry?: () => void;
|
|
1233
1305
|
className?: string;
|
|
1234
1306
|
style?: CSSProperties;
|
|
@@ -1237,12 +1309,11 @@ interface EmptyCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
|
|
|
1237
1309
|
/**
|
|
1238
1310
|
* Empty.Card — 等高三态占位
|
|
1239
1311
|
*
|
|
1240
|
-
* 统一「加载中 / 加载结束空 /
|
|
1241
|
-
*
|
|
1242
|
-
* 避免列表或卡片区域跳动。
|
|
1312
|
+
* 统一「加载中 / 加载结束空 / 加载结束失败」三态:同一 size + spacing 档位下
|
|
1313
|
+
* 三态 min-height 一致,状态切换时容器高度不变,避免列表或卡片区域跳动。
|
|
1243
1314
|
*
|
|
1244
|
-
*
|
|
1245
|
-
*
|
|
1315
|
+
* 图标与文案的排版直接复用 Empty(size 透传),本组件只额外负责三件事:
|
|
1316
|
+
* 等高约束、重试交互、状态无障碍播报。
|
|
1246
1317
|
*/
|
|
1247
1318
|
declare const EmptyCard: React__default.ForwardRefExoticComponent<EmptyCardProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1248
1319
|
|
|
@@ -1252,8 +1323,8 @@ declare const EmptyCard: React__default.ForwardRefExoticComponent<EmptyCardProps
|
|
|
1252
1323
|
* 用 Object.assign 而非对象字面量挂载子组件:
|
|
1253
1324
|
* 保留 EmptyRoot 的 forwardRef 类型,使 <Empty ref={...} /> 仍可直接使用。
|
|
1254
1325
|
*/
|
|
1255
|
-
declare const Empty:
|
|
1256
|
-
Card:
|
|
1326
|
+
declare const Empty: React$1.ForwardRefExoticComponent<EmptyProps & React$1.RefAttributes<HTMLDivElement>> & {
|
|
1327
|
+
Card: React$1.ForwardRefExoticComponent<EmptyCardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1257
1328
|
};
|
|
1258
1329
|
|
|
1259
1330
|
/** 附件/截图元信息 */
|
|
@@ -2706,6 +2777,10 @@ interface FileItemActions {
|
|
|
2706
2777
|
/** 重新上传 */
|
|
2707
2778
|
retry: () => void;
|
|
2708
2779
|
}
|
|
2780
|
+
/** 上传请求方法 */
|
|
2781
|
+
type UploadMethod = "POST" | "PUT" | "PATCH" | "post" | "put" | "patch";
|
|
2782
|
+
/** beforeUpload 允许的返回值:false 阻止上传,File/Blob 替换待传文件 */
|
|
2783
|
+
type BeforeUploadReturn = boolean | void | File | Blob;
|
|
2709
2784
|
interface UploadProps {
|
|
2710
2785
|
/** 接受的文件 MIME 类型,如 "image/*,.pdf" */
|
|
2711
2786
|
accept?: string;
|
|
@@ -2717,6 +2792,11 @@ interface UploadProps {
|
|
|
2717
2792
|
multiple?: boolean;
|
|
2718
2793
|
/** 是否渲染拖拽上传区域 */
|
|
2719
2794
|
drag?: boolean;
|
|
2795
|
+
/**
|
|
2796
|
+
* 是否选择文件夹。开启后点击选择目录,拖拽时递归遍历子目录,
|
|
2797
|
+
* 并强制按 `accept` 过滤(目录内文件不经过选择器,无法靠原生 accept 拦截)。
|
|
2798
|
+
*/
|
|
2799
|
+
directory?: boolean;
|
|
2720
2800
|
/** 禁用状态 */
|
|
2721
2801
|
disabled?: boolean;
|
|
2722
2802
|
/** 受控文件列表 */
|
|
@@ -2731,6 +2811,28 @@ interface UploadProps {
|
|
|
2731
2811
|
* 由消费方在提交时自行携带。
|
|
2732
2812
|
*/
|
|
2733
2813
|
customRequest?: (options: CustomRequestOptions) => CustomRequestReturn | void;
|
|
2814
|
+
/**
|
|
2815
|
+
* 上传地址。传入即启用内置 XHR 上传(含真实进度事件),
|
|
2816
|
+
* 无需自行实现 `customRequest`。同时传入时 `customRequest` 优先。
|
|
2817
|
+
*/
|
|
2818
|
+
action?: string | ((file: File) => string | PromiseLike<string>);
|
|
2819
|
+
/** 请求方法,默认 POST。仅 `action` 模式生效 */
|
|
2820
|
+
method?: UploadMethod;
|
|
2821
|
+
/** 附加请求头。仅 `action` 模式生效 */
|
|
2822
|
+
headers?: Record<string, string>;
|
|
2823
|
+
/** 附加表单字段,可为函数按文件动态生成。仅 `action` 模式生效 */
|
|
2824
|
+
data?: Record<string, unknown> | ((file: File) => Record<string, unknown>);
|
|
2825
|
+
/** 跨域请求是否携带 cookie。仅 `action` 模式生效 */
|
|
2826
|
+
withCredentials?: boolean;
|
|
2827
|
+
/** 表单中文件字段名,默认 "file"。仅 `action` 模式生效 */
|
|
2828
|
+
name?: string;
|
|
2829
|
+
/**
|
|
2830
|
+
* 上传前钩子,在内置校验(类型/数量/大小)通过之后执行。
|
|
2831
|
+
*
|
|
2832
|
+
* 返回 `false` 或 reject 阻止该文件上传;返回 `File`/`Blob` 则用其替换
|
|
2833
|
+
* 待上传的文件,适用于压缩、转格式等场景(原始文件仍保留在 `originFile`)。
|
|
2834
|
+
*/
|
|
2835
|
+
beforeUpload?: (file: File, fileList: File[]) => BeforeUploadReturn | Promise<BeforeUploadReturn>;
|
|
2734
2836
|
/**
|
|
2735
2837
|
* 粘贴上传。开启后监听容器内的 paste 事件,
|
|
2736
2838
|
* 取剪贴板中的文件(如截图)走同一套校验与收集流程。
|
|
@@ -2767,7 +2869,10 @@ interface UploadProps {
|
|
|
2767
2869
|
|
|
2768
2870
|
/**
|
|
2769
2871
|
* Upload 上传组件
|
|
2770
|
-
*
|
|
2872
|
+
*
|
|
2873
|
+
* 内核采用 rc-upload(@rc-component/upload):原生 input、点击/键盘触发、
|
|
2874
|
+
* 拖拽落盘、文件夹递归遍历、accept 判定、XHR 请求与中止均由其承担。
|
|
2875
|
+
* 本层负责 lingee 的 UploadFile 列表语义、批量校验与 UI。
|
|
2771
2876
|
*/
|
|
2772
2877
|
declare const Upload: React__default.ForwardRefExoticComponent<UploadProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2773
2878
|
|
|
@@ -2833,6 +2938,101 @@ declare const ScrollArea: React__default.ForwardRefExoticComponent<ScrollAreaPro
|
|
|
2833
2938
|
*/
|
|
2834
2939
|
declare const ScrollBar: React__default.ForwardRefExoticComponent<ScrollBarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2835
2940
|
|
|
2941
|
+
/** 指示器位置 */
|
|
2942
|
+
type CarouselDotsPlacement = "inside" | "outside";
|
|
2943
|
+
/**
|
|
2944
|
+
* 轮播实例 API
|
|
2945
|
+
* 刻意收窄为最小可用集合,不直接暴露 embla 类型,避免消费方类型依赖泄漏
|
|
2946
|
+
*/
|
|
2947
|
+
interface CarouselApi {
|
|
2948
|
+
/** 跳转到指定序号(0 开始),jump 为 true 时不播放过渡动画 */
|
|
2949
|
+
scrollTo: (index: number, jump?: boolean) => void;
|
|
2950
|
+
/** 上一页 */
|
|
2951
|
+
scrollPrev: () => void;
|
|
2952
|
+
/** 下一页 */
|
|
2953
|
+
scrollNext: () => void;
|
|
2954
|
+
/** 是否可向前翻页(loop 模式下恒为 true) */
|
|
2955
|
+
canScrollPrev: () => boolean;
|
|
2956
|
+
/** 是否可向后翻页(loop 模式下恒为 true) */
|
|
2957
|
+
canScrollNext: () => boolean;
|
|
2958
|
+
/** 当前选中序号 */
|
|
2959
|
+
selectedIndex: () => number;
|
|
2960
|
+
/** 总页数 */
|
|
2961
|
+
count: () => number;
|
|
2962
|
+
/** 启动自动轮播 */
|
|
2963
|
+
play: () => void;
|
|
2964
|
+
/** 暂停自动轮播 */
|
|
2965
|
+
stop: () => void;
|
|
2966
|
+
/** 重新初始化(外部改变了尺寸或结构时手动触发) */
|
|
2967
|
+
reInit: () => void;
|
|
2968
|
+
}
|
|
2969
|
+
interface CarouselProps {
|
|
2970
|
+
/** 轮播项,需为 CarouselItem */
|
|
2971
|
+
children: ReactNode;
|
|
2972
|
+
/** 自定义类名(应用于根容器) */
|
|
2973
|
+
className?: string;
|
|
2974
|
+
/** 自定义样式(应用于根容器) */
|
|
2975
|
+
style?: CSSProperties;
|
|
2976
|
+
/** 是否循环轮播 */
|
|
2977
|
+
loop?: boolean;
|
|
2978
|
+
/** 是否开启自动轮播 */
|
|
2979
|
+
autoplay?: boolean;
|
|
2980
|
+
/** 自动轮播间隔(ms),设计规范建议 3000 ~ 6000 */
|
|
2981
|
+
autoplayDelay?: number;
|
|
2982
|
+
/** 鼠标移入时暂停自动轮播,移出恢复 */
|
|
2983
|
+
stopOnMouseEnter?: boolean;
|
|
2984
|
+
/** 用户手动交互(拖拽 / 点击指示器)后彻底停止自动轮播 */
|
|
2985
|
+
stopOnInteraction?: boolean;
|
|
2986
|
+
/** 是否允许拖拽 / 滑动切换 */
|
|
2987
|
+
draggable?: boolean;
|
|
2988
|
+
/** 每屏展示的轮播项数量,多图模式下配合 gap 使用 */
|
|
2989
|
+
slidesPerView?: number;
|
|
2990
|
+
/** 轮播项之间的间距(px) */
|
|
2991
|
+
gap?: number;
|
|
2992
|
+
/** 初始选中序号(0 开始) */
|
|
2993
|
+
defaultIndex?: number;
|
|
2994
|
+
/** 是否展示圆点指示器 */
|
|
2995
|
+
dots?: boolean;
|
|
2996
|
+
/** 指示器位置:inside 浮于内容上方,outside 位于轮播下方 */
|
|
2997
|
+
dotsPlacement?: CarouselDotsPlacement;
|
|
2998
|
+
/** 指示器是否使用半透明毛玻璃胶囊底,用于内容色彩复杂的场景 */
|
|
2999
|
+
dotsGlassy?: boolean;
|
|
3000
|
+
/** 是否展示左右箭头 */
|
|
3001
|
+
arrows?: boolean;
|
|
3002
|
+
/** 选中项变化回调 */
|
|
3003
|
+
onChange?: (index: number) => void;
|
|
3004
|
+
/** 获取轮播实例,用于外部控制翻页 */
|
|
3005
|
+
apiRef?: Ref<CarouselApi>;
|
|
3006
|
+
}
|
|
3007
|
+
interface CarouselItemProps {
|
|
3008
|
+
/** 轮播项内容 */
|
|
3009
|
+
children?: ReactNode;
|
|
3010
|
+
/** 自定义类名 */
|
|
3011
|
+
className?: string;
|
|
3012
|
+
/** 自定义样式 */
|
|
3013
|
+
style?: CSSProperties;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Carousel 轮播容器组件
|
|
3018
|
+
*
|
|
3019
|
+
* 水平方向切换,默认从右至左自动轮播,也支持拖拽与点击指示器切换。
|
|
3020
|
+
*
|
|
3021
|
+
* ```tsx
|
|
3022
|
+
* <Carousel autoplay loop>
|
|
3023
|
+
* <Carousel.Item>第一屏</Carousel.Item>
|
|
3024
|
+
* <Carousel.Item>第二屏</Carousel.Item>
|
|
3025
|
+
* </Carousel>
|
|
3026
|
+
* ```
|
|
3027
|
+
*/
|
|
3028
|
+
declare const CarouselRoot: React__default.ForwardRefExoticComponent<CarouselProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3029
|
+
/** Carousel.Item 轮播项 */
|
|
3030
|
+
declare const CarouselItem: React__default.ForwardRefExoticComponent<CarouselItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3031
|
+
type CarouselComponent = typeof CarouselRoot & {
|
|
3032
|
+
Item: typeof CarouselItem;
|
|
3033
|
+
};
|
|
3034
|
+
declare const Carousel: CarouselComponent;
|
|
3035
|
+
|
|
2836
3036
|
/**
|
|
2837
3037
|
* 合并 CSS 类名,支持条件拼接
|
|
2838
3038
|
* @param inputs - 任意数量的 ClassValue 参数
|
|
@@ -2840,4 +3040,4 @@ declare const ScrollBar: React__default.ForwardRefExoticComponent<ScrollBarProps
|
|
|
2840
3040
|
*/
|
|
2841
3041
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2842
3042
|
|
|
2843
|
-
export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfirmOptions, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, cn, enUS, formatFileSize, useComponentLocale, useLocale, zhCN };
|
|
3043
|
+
export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfirmOptions, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, type DropdownEllipsisTooltip, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, cn, enUS, formatFileSize, useComponentLocale, useLocale, zhCN };
|