lingee-ui 0.0.23 → 0.0.25

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.
Files changed (59) hide show
  1. package/dist/button/index.d.mts +1 -1
  2. package/dist/button/index.d.ts +1 -1
  3. package/dist/button/index.js +1 -1
  4. package/dist/button/index.mjs +1 -1
  5. package/dist/{chunk-CQVDHCVR.js → chunk-2N2YZIHQ.js} +1 -1
  6. package/dist/chunk-CATPKTPR.mjs +1 -0
  7. package/dist/chunk-EBYXYMEL.mjs +1 -0
  8. package/dist/{chunk-CJUKQFAJ.js → chunk-ENYYJ7ES.js} +1 -1
  9. package/dist/chunk-MFBMJTYZ.js +2 -0
  10. package/dist/chunk-QEKT37W5.js +1 -0
  11. package/dist/chunk-TDJG7ZB6.js +1 -0
  12. package/dist/{chunk-RTCATZUZ.js → chunk-VKZD4ESR.js} +1 -1
  13. package/dist/chunk-XVM4RPVQ.mjs +2 -0
  14. package/dist/chunk-Y463GZ2F.mjs +1 -0
  15. package/dist/chunk-YURAXA54.mjs +2 -0
  16. package/dist/chunk-Z4J7SMTI.mjs +1 -0
  17. package/dist/{index-7pb5YOcq.d.mts → index-89atTLPD.d.mts} +2 -2
  18. package/dist/{index-7pb5YOcq.d.ts → index-89atTLPD.d.ts} +2 -2
  19. package/dist/index.css +1 -1
  20. package/dist/index.d.mts +348 -18
  21. package/dist/index.d.ts +348 -18
  22. package/dist/index.js +2 -2
  23. package/dist/index.mjs +2 -2
  24. package/dist/input/index.js +1 -1
  25. package/dist/input/index.mjs +1 -1
  26. package/dist/tabs/index.css +1 -1
  27. package/dist/tabs/index.js +1 -1
  28. package/dist/tabs/index.mjs +1 -1
  29. package/dist/toast/index.js +1 -1
  30. package/dist/toast/index.mjs +1 -1
  31. package/dist/tooltip/index.js +1 -1
  32. package/dist/tooltip/index.mjs +1 -1
  33. package/dist/tree/index.css +1 -1
  34. package/dist/tree/index.js +1 -1
  35. package/dist/tree/index.mjs +1 -1
  36. package/package.json +2 -1
  37. package/skill/AGENTS-SNIPPET.md +5 -2
  38. package/skill/SKILL.md +6 -3
  39. package/skill/VERSION.json +3 -3
  40. package/skill/references/components/cascader.md +97 -0
  41. package/skill/references/components/color-picker.md +10 -3
  42. package/skill/references/components/dialog.md +15 -4
  43. package/skill/references/components/drawer.md +1 -1
  44. package/skill/references/components/dropdown.md +1 -1
  45. package/skill/references/components/table.md +2 -1
  46. package/skill/references/components/timeline.md +75 -0
  47. package/skill/references/components/tree-select.md +86 -0
  48. package/skill/references/components/upload.md +2 -1
  49. package/skill/references/setup.md +2 -2
  50. package/skill/references/tokens.md +1 -1
  51. package/dist/chunk-4VICYRWD.mjs +0 -1
  52. package/dist/chunk-B3BNV2BA.js +0 -1
  53. package/dist/chunk-CHYJKCAM.mjs +0 -1
  54. package/dist/chunk-FDENIWMP.mjs +0 -2
  55. package/dist/chunk-LS4LPBJT.js +0 -2
  56. package/dist/chunk-PEXFBRR4.mjs +0 -2
  57. package/dist/chunk-RNRDXECM.js +0 -1
  58. package/dist/chunk-S5TTZBPX.mjs +0 -1
  59. package/dist/chunk-T3QXFSH7.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as ButtonProps } from './index-7pb5YOcq.mjs';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-7pb5YOcq.mjs';
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
- import React__default, { ReactNode, MouseEvent, CSSProperties, HTMLAttributes, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
4
+ import React__default, { ReactNode, MouseEvent, CSSProperties, HTMLAttributes, ComponentType, Key, ElementType, ReactElement, UIEventHandler, Ref } from 'react';
5
5
  import { TooltipProps } from './tooltip/index.mjs';
6
6
  export { Tooltip, TooltipPlacement } from './tooltip/index.mjs';
7
7
  export { TabItem, Tabs, TabsOverflow, TabsProps, TabsScrollOptions, TabsSize, TabsVariant } from './tabs/index.mjs';
@@ -266,9 +266,18 @@ declare const zhCN: {
266
266
  removeShort: string;
267
267
  dragText: string;
268
268
  clickUpload: string;
269
+ upload: string;
270
+ };
271
+ Cascader: {
272
+ empty: string;
273
+ };
274
+ TreeSelect: {
275
+ empty: string;
269
276
  };
270
277
  ColorPicker: {
271
278
  placeholder: string;
279
+ hexInput: string;
280
+ alphaInput: string;
272
281
  };
273
282
  DatePicker: {
274
283
  placeholder: string;
@@ -375,7 +384,7 @@ declare const zhCN: {
375
384
  };
376
385
 
377
386
  /** 语言包类型,由 zh-CN 推导结构 */
378
- type Locale = typeof zhCN;
387
+ type Locale$1 = typeof zhCN;
379
388
  /** Dialog 的全局基线配置,单个 Dialog 的同名 Props 优先。 */
380
389
  interface DialogConfig {
381
390
  /** 遮罩层 z-index;弹窗内容自动使用该值 + 1 */
@@ -383,7 +392,7 @@ interface DialogConfig {
383
392
  }
384
393
  interface LingeeProviderProps {
385
394
  /** 语言包,默认中文 */
386
- locale?: Locale;
395
+ locale?: Locale$1;
387
396
  /** Dialog 组件的全局基线配置 */
388
397
  dialog?: DialogConfig;
389
398
  /**
@@ -451,9 +460,18 @@ declare const enUS: {
451
460
  removeShort: string;
452
461
  dragText: string;
453
462
  clickUpload: string;
463
+ upload: string;
464
+ };
465
+ Cascader: {
466
+ empty: string;
467
+ };
468
+ TreeSelect: {
469
+ empty: string;
454
470
  };
455
471
  ColorPicker: {
456
472
  placeholder: string;
473
+ hexInput: string;
474
+ alphaInput: string;
457
475
  };
458
476
  DatePicker: {
459
477
  placeholder: string;
@@ -556,6 +574,37 @@ declare const enUS: {
556
574
  };
557
575
  };
558
576
 
577
+ /**
578
+ * 马来语语言包(Bahasa Melayu)
579
+ * 结构与 zh-CN 一一对应,文案对照 en-US 翻译
580
+ */
581
+
582
+ declare const msMY: Locale;
583
+
584
+ /**
585
+ * 印尼语语言包(Bahasa Indonesia)
586
+ * 结构与 zh-CN 一一对应,文案对照 en-US 翻译
587
+ */
588
+
589
+ declare const idID: Locale;
590
+
591
+ /**
592
+ * 泰语语言包(ไทย)
593
+ * 结构与 zh-CN 一一对应,文案对照 en-US 翻译;年份使用公历
594
+ */
595
+
596
+ declare const thTH: Locale;
597
+
598
+ /** 语言包类型,由 zh-CN 推导结构 */
599
+ type Locale = typeof zhCN;
600
+
601
+ /**
602
+ * 繁體中文語言包(臺灣用語)
603
+ * 結構與 zh-CN 一一對應,由 zh-CN 經 OpenCC 轉換後校對
604
+ */
605
+
606
+ declare const zhTW: Locale;
607
+
559
608
  interface ComponentConfig {
560
609
  dialog: DialogConfig;
561
610
  }
@@ -584,11 +633,11 @@ declare namespace LingeeProvider {
584
633
  /**
585
634
  * 获取当前完整语言包
586
635
  */
587
- declare function useLocale(): Locale;
636
+ declare function useLocale(): Locale$1;
588
637
  /**
589
638
  * 获取指定组件的语言包片段
590
639
  */
591
- declare function useComponentLocale<K extends keyof Omit<Locale, "locale">>(componentName: K): Locale[K];
640
+ declare function useComponentLocale<K extends keyof Omit<Locale$1, "locale">>(componentName: K): Locale$1[K];
592
641
  /**
593
642
  * 获取当前接入方标识(React 组件内使用;命令式场景用 site-config 的 getSite)
594
643
  */
@@ -684,12 +733,39 @@ interface DialogHostModal {
684
733
  * 弹窗保留,全部发起方卸载后弹窗才随兜底关闭。
685
734
  */
686
735
  fixedId?: string;
736
+ /**
737
+ * 客户端里改用独立窗口承载,见 `DialogHostWindow`。
738
+ *
739
+ * 没有独立窗口可开的环境(浏览器、旧版客户端、被 iframe 嵌入)回退本地渲染,
740
+ * 不退回居中带遮罩的宿主弹窗。
741
+ */
742
+ window?: DialogHostWindow;
687
743
  /**
688
744
  * 宿主弹窗关闭时回调。
689
745
  * @param result 承载页通过 `closeHostModal` 回传的业务结果;用户直接关窗时为 undefined
690
746
  */
691
747
  onResult?: (result?: unknown) => void;
692
748
  }
749
+ /**
750
+ * 客户端独立窗口配置(`hostModal.window`)。
751
+ *
752
+ * 传了它,客户端里用一个独立的系统窗口承载弹窗:没有遮罩,主窗口照常可操作,
753
+ * 拖动窗口标题条可以拖出主窗口、跨屏。承载页与宿主弹窗相同(`HostModalPage`)。
754
+ *
755
+ * 浏览器、旧版客户端与被 iframe 嵌入的页面没有独立窗口可开,回退本地渲染(可配合 `draggable`)。
756
+ * 不退回居中带遮罩的宿主弹窗:那会挡住主窗口,与非模态浮窗的诉求相反。
757
+ *
758
+ * 尺寸:宽度取 Dialog 的 `width`(须为数字);内容区高度取 `contentHeight`,
759
+ * 未传时取面板总高减去 68px 标题栏。窗口自带标题条与关闭入口,`headless` 不生效。
760
+ */
761
+ interface DialogHostWindow {
762
+ /** 首次出现的位置,相对客户端主窗口,默认 "center" */
763
+ position?: "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
764
+ /** 是否置顶在其它应用之上,默认 false */
765
+ alwaysOnTop?: boolean;
766
+ /** 是否可调整窗口大小,默认 false */
767
+ resizable?: boolean;
768
+ }
693
769
  interface DialogProps {
694
770
  /** 是否打开 */
695
771
  open: boolean;
@@ -738,6 +814,19 @@ interface DialogProps {
738
814
  mask?: boolean;
739
815
  /** 遮罩层自定义类名(覆盖默认背景/模糊等),仅 mask=true 时生效 */
740
816
  maskClassName?: string;
817
+ /**
818
+ * 是否可拖动面板,默认 false。
819
+ *
820
+ * 拖拽区默认是标题栏(传了 `title` 或 `extra` 才有)。没有标题栏,或标题栏以外也要能拖时,
821
+ * 给 children 里的元素加 `data-lg-dialog-drag-handle`。拖拽区里的按钮、链接、输入框等
822
+ * 照常可点、不起拖;其它可点击的元素加 `data-lg-dialog-no-drag` 排除。
823
+ *
824
+ * 面板始终完整留在视口内;双击拖拽区回到初始位置,关闭后再打开也从初始位置开始。
825
+ * 开启后面板的 `transform` 由拖拽接管,`style` 里传的 `transform` 不生效,初始位置用 `top` / `left` 调整。
826
+ *
827
+ * 只作用于本地渲染:交给宿主承载(`hostModal` 生效)时不生效。
828
+ */
829
+ draggable?: boolean;
741
830
  /** 关闭后是否销毁子节点,默认 true */
742
831
  destroyOnHidden?: boolean;
743
832
  /** 自定义 z-index;优先于 LingeeProvider 的 dialog.zIndex */
@@ -758,8 +847,12 @@ interface ConfirmRenderProps {
758
847
  /** 动态设置确认按钮的 disabled 状态 */
759
848
  setOkDisabled: (disabled: boolean) => void;
760
849
  }
761
- /** Dialog.confirm 命令式参数 */
762
- interface DialogConfirmOptions extends Omit<DialogProps, "open" | "onOpenChange" | "children"> {
850
+ /**
851
+ * Dialog.confirm 命令式参数
852
+ *
853
+ * 不含 `draggable`:确认框的标题画在内容区里,没有标题栏,默认布局里找不到拖拽区。
854
+ */
855
+ interface DialogConfirmOptions extends Omit<DialogProps, "open" | "onOpenChange" | "children" | "draggable"> {
763
856
  /**
764
857
  * 点击遮罩是否关闭确认框(按取消结算)。
765
858
  *
@@ -1073,7 +1166,7 @@ interface DropdownProps {
1073
1166
  defaultOpen?: boolean;
1074
1167
  /** 开关变化回调 */
1075
1168
  onOpenChange?: (open: boolean) => void;
1076
- /** 是否为 modal 模式(锁定背景交互),默认 true */
1169
+ /** 是否为 modal 模式(锁定背景的点击、滚动与焦点,打开时点外部只关闭菜单),默认 false */
1077
1170
  modal?: boolean;
1078
1171
  /** 整体禁用,为 true 时 Trigger 不可交互且无法打开面板 */
1079
1172
  disabled?: boolean;
@@ -2874,6 +2967,21 @@ interface TableStatusText {
2874
2967
  empty?: ReactNode;
2875
2968
  error?: ReactNode;
2876
2969
  }
2970
+ /** 可替换的表格内部元素,结构同 rc-table 的 components */
2971
+ interface TableComponents {
2972
+ header?: {
2973
+ wrapper?: ElementType;
2974
+ row?: ElementType;
2975
+ /** 表头单元格,接收列 `onHeaderCell` 返回的属性,可用于实现拖拽调宽等 */
2976
+ cell?: ElementType;
2977
+ };
2978
+ body?: {
2979
+ wrapper?: ElementType;
2980
+ row?: ElementType;
2981
+ /** 表体单元格,接收列 `onCell` 返回的属性 */
2982
+ cell?: ElementType;
2983
+ };
2984
+ }
2877
2985
  /**
2878
2986
  * Table 组件 Props
2879
2987
  */
@@ -2931,12 +3039,200 @@ interface TableProps<RecordType = any> {
2931
3039
  striped?: boolean;
2932
3040
  /** 行 hover 高亮 */
2933
3041
  hoverable?: boolean;
3042
+ /**
3043
+ * 替换表格内部元素的渲染组件(如自定义表头单元格实现拖拽调宽)。
3044
+ * 需保持引用稳定,每次渲染传新对象会让对应元素整体重建
3045
+ */
3046
+ components?: TableComponents;
2934
3047
  }
2935
3048
 
2936
3049
  declare const Table: <RecordType = any>(props: TableProps<RecordType> & {
2937
3050
  ref?: React__default.Ref<HTMLDivElement>;
2938
3051
  }) => React__default.ReactElement | null;
2939
3052
 
3053
+ /**
3054
+ * 节点状态,决定圆点颜色:default 未开始、processing 进行中、completed 已完成、
3055
+ * unfinished 未完成、disabled 不可用(左侧时间同时置灰)
3056
+ */
3057
+ type TimelineStatus = "default" | "processing" | "completed" | "unfinished" | "disabled";
3058
+ /** 时间轴节点,未声明的属性原样落到 <li> 上(如 aria-current) */
3059
+ interface TimelineItem extends Omit<HTMLAttributes<HTMLLIElement>, "content" | "color"> {
3060
+ /** 唯一标识,缺省用索引 */
3061
+ key?: Key;
3062
+ /** 节点左侧的时间或标签,右对齐;任一节点传了,所有节点都会留出这一列 */
3063
+ time?: ReactNode;
3064
+ /** 节点内容 */
3065
+ content?: ReactNode;
3066
+ /** 节点状态,决定圆点颜色,默认 "default" */
3067
+ status?: TimelineStatus;
3068
+ /** 自定义圆点颜色,优先于 status;传语义 Token 可随主题切换 */
3069
+ color?: string;
3070
+ /** 是否实心圆点 */
3071
+ filled?: boolean;
3072
+ }
3073
+ interface TimelineProps {
3074
+ /** 节点数据 */
3075
+ items: TimelineItem[];
3076
+ /** 自定义类名 */
3077
+ className?: string;
3078
+ /** 自定义样式 */
3079
+ style?: CSSProperties;
3080
+ }
3081
+ /** 卡片状态:processing 主色描边,completed 整体置灰 */
3082
+ type TimelineCardStatus = "default" | "processing" | "completed";
3083
+ /** 时间轴内容卡片,未声明的属性原样落到根节点 */
3084
+ interface TimelineCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
3085
+ /** 卡片顶部的时间段,如日程的起止时间 */
3086
+ time?: ReactNode;
3087
+ /** 右上角内容,如状态标签;有 time 时与它同行,否则放在标题行末尾 */
3088
+ extra?: ReactNode;
3089
+ /** 标题 */
3090
+ title?: ReactNode;
3091
+ /** 标题最多显示的行数,超出省略,默认 1 */
3092
+ titleLines?: number;
3093
+ /** 紧跟标题的标签 */
3094
+ tag?: ReactNode;
3095
+ /** 描述 */
3096
+ description?: ReactNode;
3097
+ /** 描述最多显示的行数,超出省略,默认 2 */
3098
+ descriptionLines?: number;
3099
+ /** 底部内容,如操作或附加信息 */
3100
+ footer?: ReactNode;
3101
+ /** 卡片状态,默认 "default" */
3102
+ status?: TimelineCardStatus;
3103
+ /** 悬停时高亮背景,可点击的卡片开启 */
3104
+ hoverable?: boolean;
3105
+ }
3106
+
3107
+ /**
3108
+ * TimelineCard 时间轴内容卡片
3109
+ * 作为 Timeline 节点的 content 直接传入时,节点的时间与圆点会下移卡片内边距,对齐卡片首行
3110
+ */
3111
+ declare const TimelineCard: React__default.ForwardRefExoticComponent<TimelineCardProps & React__default.RefAttributes<HTMLDivElement>>;
3112
+
3113
+ /** 用 Object.assign 挂载子组件,保留 forwardRef 类型,<Timeline ref={...} /> 仍可直接使用 */
3114
+ declare const Timeline: React__default.ForwardRefExoticComponent<TimelineProps & React__default.RefAttributes<HTMLOListElement>> & {
3115
+ Card: React__default.ForwardRefExoticComponent<TimelineCardProps & React__default.RefAttributes<HTMLDivElement>>;
3116
+ };
3117
+
3118
+ type TreeSelectSize = SelectSize;
3119
+ /** 树选择节点 */
3120
+ interface TreeSelectNode {
3121
+ /** 节点值,同一棵树内需唯一 */
3122
+ value: string;
3123
+ /** 节点标题,选中后同时作为触发器中的文本 */
3124
+ title: ReactNode;
3125
+ /** 子节点 */
3126
+ children?: TreeSelectNode[];
3127
+ /** 是否禁用 */
3128
+ disabled?: boolean;
3129
+ }
3130
+ /** 下拉面板配置 */
3131
+ interface TreeSelectDropdownProps {
3132
+ /** 面板最大高度(px),超出时滚动,默认 346 */
3133
+ maxHeight?: number;
3134
+ /** 面板宽度(px),`"auto"` 时按内容自适应,默认与触发器同宽 */
3135
+ width?: number | "auto";
3136
+ /** 下拉浮层的自定义类名 */
3137
+ className?: string;
3138
+ /** Portal 挂载容器,传 `null` 时就地渲染 */
3139
+ container?: HTMLElement | null;
3140
+ }
3141
+ interface TreeSelectProps {
3142
+ /** 树形数据 */
3143
+ treeData: TreeSelectNode[];
3144
+ /** 当前选中值(受控);显式传 `undefined` 也视为受控的空值 */
3145
+ value?: string;
3146
+ /** 默认选中值(非受控) */
3147
+ defaultValue?: string;
3148
+ /** 选中或清空时回调,清空时两个参数均为 `undefined` */
3149
+ onChange?: (value: string | undefined, node: TreeSelectNode | undefined) => void;
3150
+ /** 占位文本 */
3151
+ placeholder?: string;
3152
+ /** 是否禁用 */
3153
+ disabled?: boolean;
3154
+ /** 是否错误态 */
3155
+ error?: boolean;
3156
+ /** 是否可清空 */
3157
+ allowClear?: boolean;
3158
+ /** 尺寸,默认 "md" */
3159
+ size?: TreeSelectSize;
3160
+ /** 是否默认展开全部节点 */
3161
+ defaultExpandAll?: boolean;
3162
+ /** 无数据时面板中展示的内容 */
3163
+ notFoundContent?: ReactNode;
3164
+ /** 下拉面板配置 */
3165
+ dropdown?: TreeSelectDropdownProps;
3166
+ /** 自定义类名 */
3167
+ className?: string;
3168
+ /** 自定义样式 */
3169
+ style?: CSSProperties;
3170
+ }
3171
+
3172
+ /**
3173
+ * TreeSelect 树选择
3174
+ * 触发器与面板外观沿用 Select,面板内用 Tree 展示层级,单选
3175
+ */
3176
+ declare const TreeSelect: React__default.ForwardRefExoticComponent<TreeSelectProps & React__default.RefAttributes<HTMLDivElement>>;
3177
+
3178
+ type CascaderSize = SelectSize;
3179
+ /** 级联选项 */
3180
+ interface CascaderOption {
3181
+ /** 选项值,同一层级内需唯一 */
3182
+ value: string;
3183
+ /** 选项文本,选中后按层级拼接显示在触发器中 */
3184
+ label: ReactNode;
3185
+ /** 下一级选项,有值时点击展开下一列而不是直接选中 */
3186
+ children?: CascaderOption[];
3187
+ /** 是否禁用 */
3188
+ disabled?: boolean;
3189
+ }
3190
+ /** 下拉面板配置 */
3191
+ interface CascaderDropdownProps {
3192
+ /** 每列的最大高度(px),超出时该列滚动,默认 346(约 10 项);同时不超出视口可用高度 */
3193
+ maxHeight?: number;
3194
+ /** 下拉浮层的自定义类名 */
3195
+ className?: string;
3196
+ /** Portal 挂载容器,传 `null` 时就地渲染 */
3197
+ container?: HTMLElement | null;
3198
+ }
3199
+ interface CascaderProps {
3200
+ /** 级联数据 */
3201
+ options: CascaderOption[];
3202
+ /** 当前选中路径(受控),自根到叶的 value 数组;显式传 `undefined` 也视为受控的空值 */
3203
+ value?: string[];
3204
+ /** 默认选中路径(非受控) */
3205
+ defaultValue?: string[];
3206
+ /** 选中叶子或清空时回调,清空时路径为空数组 */
3207
+ onChange?: (value: string[], selectedOptions: CascaderOption[]) => void;
3208
+ /** 占位文本 */
3209
+ placeholder?: string;
3210
+ /** 是否禁用 */
3211
+ disabled?: boolean;
3212
+ /** 是否错误态 */
3213
+ error?: boolean;
3214
+ /** 是否可清空 */
3215
+ allowClear?: boolean;
3216
+ /** 尺寸,默认 "md" */
3217
+ size?: CascaderSize;
3218
+ /** 触发器中各级文本的分隔符,默认 " / " */
3219
+ separator?: string;
3220
+ /** 无数据时面板中展示的内容 */
3221
+ notFoundContent?: ReactNode;
3222
+ /** 下拉面板配置 */
3223
+ dropdown?: CascaderDropdownProps;
3224
+ /** 自定义类名 */
3225
+ className?: string;
3226
+ /** 自定义样式 */
3227
+ style?: CSSProperties;
3228
+ }
3229
+
3230
+ /**
3231
+ * Cascader 级联选择
3232
+ * 触发器与浮层外观沿用 Select,面板为逐级展开的多列菜单,只能选中叶子
3233
+ */
3234
+ declare const Cascader: React__default.ForwardRefExoticComponent<CascaderProps & React__default.RefAttributes<HTMLDivElement>>;
3235
+
2940
3236
  /** 预览变换状态 */
2941
3237
  type TransformType = {
2942
3238
  x: number;
@@ -3073,15 +3369,25 @@ declare const Image: React__default.FC<ImageProps> & {
3073
3369
  };
3074
3370
 
3075
3371
  type ColorPickerSize = LgSize;
3372
+ /** 颜色的 RGBA 分量:r / g / b 取 0–255,a 取 0–1 */
3373
+ interface ColorPickerRgba {
3374
+ r: number;
3375
+ g: number;
3376
+ b: number;
3377
+ a: number;
3378
+ }
3076
3379
  interface ColorPickerProps {
3077
3380
  /** 当前颜色值(受控),支持 hex 字符串如 "#ff0000" */
3078
3381
  value?: string;
3079
3382
  /** 默认颜色值(非受控) */
3080
3383
  defaultValue?: string;
3081
- /** 颜色变化回调 */
3082
- onChange?: (color: string) => void;
3083
- /** 拖拽结束回调 */
3084
- onChangeComplete?: (color: string) => void;
3384
+ /**
3385
+ * 颜色变化回调。color 为 hex 字符串(含透明度时为 8 位);
3386
+ * rgba 为未经 hex 量化的分量,需要输出 rgba() 等其它格式时使用
3387
+ */
3388
+ onChange?: (color: string, rgba: ColorPickerRgba) => void;
3389
+ /** 拖拽结束回调,参数同 onChange */
3390
+ onChangeComplete?: (color: string, rgba: ColorPickerRgba) => void;
3085
3391
  /** 输入框尺寸,默认 "md" */
3086
3392
  size?: ColorPickerSize;
3087
3393
  /** 是否禁用 */
@@ -3095,16 +3401,25 @@ interface ColorPickerProps {
3095
3401
  /** 自定义类名 */
3096
3402
  className?: string;
3097
3403
  /** 自定义样式 */
3098
- style?: React.CSSProperties;
3404
+ style?: CSSProperties;
3099
3405
  /** 弹出面板额外内容(如预设色板) */
3100
3406
  panelExtra?: ReactNode;
3101
3407
  /** Popover 弹出方向 */
3102
3408
  placement?: "top" | "bottom" | "left" | "right";
3409
+ /**
3410
+ * 自定义触发器,替换默认的输入框外观。需为能接收 ref 与点击事件的单个元素;
3411
+ * 传入后 size / error / placeholder / className / style 不再作用于触发器
3412
+ */
3413
+ children?: ReactElement;
3414
+ /** 面板内显示十六进制与透明度输入框,用于键入精确色值 */
3415
+ showInput?: boolean;
3416
+ /** 浮层挂载容器,打开面板时求值;默认挂载到 body */
3417
+ getPopupContainer?: () => HTMLElement;
3103
3418
  }
3104
3419
 
3105
3420
  /**
3106
3421
  * ColorPicker 颜色选择器
3107
- * 触发器参考 Input 组件外观,内容展示颜色值,右侧显示色块预览
3422
+ * 触发器参考 Input 组件外观,内容展示颜色值,右侧显示色块预览;可通过 children 替换为自定义触发器
3108
3423
  * 面板使用 @rc-component/color-picker 提供完整的颜色选取交互
3109
3424
  */
3110
3425
  declare const ColorPicker: React__default.ForwardRefExoticComponent<ColorPickerProps & React__default.RefAttributes<HTMLDivElement>>;
@@ -3167,7 +3482,13 @@ interface DrawerProps {
3167
3482
  modal?: boolean;
3168
3483
  /** 是否显示遮罩层,默认 true */
3169
3484
  mask?: boolean;
3170
- /** 关闭后是否销毁子节点,默认 true */
3485
+ /**
3486
+ * 关闭后是否销毁子节点,默认 true。
3487
+ *
3488
+ * false 时首次打开后子节点常驻,关闭只隐藏(display: none),重开复用原实例,
3489
+ * 适合承载需保留会话的 iframe;隐藏期间面板仍挂着 Radix 的 Esc 监听,
3490
+ * 它处于最上层时 Esc 事件会被标记 defaultPrevented
3491
+ */
3171
3492
  destroyOnHidden?: boolean;
3172
3493
  /** 自定义 z-index */
3173
3494
  zIndex?: number;
@@ -3877,6 +4198,8 @@ interface FileItemActions {
3877
4198
  type UploadMethod = "POST" | "PUT" | "PATCH" | "post" | "put" | "patch";
3878
4199
  /** beforeUpload 允许的返回值:false 阻止上传,File/Blob 替换待传文件 */
3879
4200
  type BeforeUploadReturn = boolean | void | File | Blob;
4201
+ /** 文件列表形态:text 为文件名列表,picture-card 为图片缩略卡片 */
4202
+ type UploadListType = "text" | "picture-card";
3880
4203
  interface UploadProps {
3881
4204
  /** 接受的文件 MIME 类型,如 "image/*,.pdf" */
3882
4205
  accept?: string;
@@ -3957,6 +4280,13 @@ interface UploadProps {
3957
4280
  renderItem?: (file: UploadFile, actions: FileItemActions) => ReactNode;
3958
4281
  /** 是否显示文件列表,默认 true */
3959
4282
  showFileList?: boolean;
4283
+ /**
4284
+ * 文件列表形态,默认 "text"。
4285
+ *
4286
+ * "picture-card" 时文件以缩略卡片排在触发区之前(点击缩略图放大预览),
4287
+ * 触发区渲染为同尺寸卡片,文件数达到 `maxCount` 后隐藏;此形态下 `drag` 不生效。
4288
+ */
4289
+ listType?: UploadListType;
3960
4290
  /** 自定义类名 */
3961
4291
  className?: string;
3962
4292
  /** 自定义样式 */
@@ -4149,4 +4479,4 @@ declare const Carousel: CarouselComponent;
4149
4479
  */
4150
4480
  declare function cn(...inputs: ClassValue[]): string;
4151
4481
 
4152
- export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbOverflow, type BreadcrumbProps, type BreadcrumbScrollOptions, type BreadcrumbSize, 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 ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, 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 EmptyCardAlign, 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, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, InfiniteScroll, type InfiniteScrollProps, type InfiniteScrollTarget, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale, DEFAULT_TABS as PERSON_PICKER_DEFAULT_TABS, ENTITY_TYPE_ORDER as PERSON_PICKER_TYPE_ORDER, Pagination, type PaginationProps, type PaginationVariant, PersonPicker, PersonPickerPanel, type PersonPickerPanelProps, type PersonPickerProps, type PickerChangeInfo, type PickerEntity, type PickerEntityType, type PickerExtra, type PickerGroup, type PickerMode, type PickerOrgPathItem, type PickerPaneData, type PickerSection, type PickerSelectedCount, type PickerState, type PickerTabChangeContext, type PickerTabKey, 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, type SidebarCaretTone, 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, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, 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, SidebarStickyHeader, type SidebarStickyHeaderProps, 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, type TableStatusText, type TableStatusType, Tag, TagProps, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, type UsePickerStateOptions, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, isInHostModal, notifyHostModalReady, entityKey as personPickerEntityKey, useComponentConfig, useComponentLocale, useLocale, usePickerState as usePersonPickerState, useSite, zhCN };
4482
+ export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbOverflow, type BreadcrumbProps, type BreadcrumbScrollOptions, type BreadcrumbSize, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Cascader, type CascaderDropdownProps, type CascaderOption, type CascaderProps, type CascaderSize, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerRgba, type ColorPickerSize, type ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, type DialogHostWindow, 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 EmptyCardAlign, 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, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, InfiniteScroll, type InfiniteScrollProps, type InfiniteScrollTarget, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale$1 as Locale, DEFAULT_TABS as PERSON_PICKER_DEFAULT_TABS, ENTITY_TYPE_ORDER as PERSON_PICKER_TYPE_ORDER, Pagination, type PaginationProps, type PaginationVariant, PersonPicker, PersonPickerPanel, type PersonPickerPanelProps, type PersonPickerProps, type PickerChangeInfo, type PickerEntity, type PickerEntityType, type PickerExtra, type PickerGroup, type PickerMode, type PickerOrgPathItem, type PickerPaneData, type PickerSection, type PickerSelectedCount, type PickerState, type PickerTabChangeContext, type PickerTabKey, 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, type SidebarCaretTone, 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, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, 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, SidebarStickyHeader, type SidebarStickyHeaderProps, 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 TableComponents, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, type TableStatusText, type TableStatusType, Tag, TagProps, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, Timeline, TimelineCard, type TimelineCardProps, type TimelineCardStatus, type TimelineItem, type TimelineProps, type TimelineStatus, TooltipProps, type TransformAction, type TransformType, TreeSelect, type TreeSelectDropdownProps, type TreeSelectNode, type TreeSelectProps, type TreeSelectSize, Upload, type UploadFile, type UploadFileStatus, type UploadListType, type UploadProps, type UsePickerStateOptions, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, idID, isInHostModal, msMY, notifyHostModalReady, entityKey as personPickerEntityKey, thTH, useComponentConfig, useComponentLocale, useLocale, usePickerState as usePersonPickerState, useSite, zhCN, zhTW };