@cregis/ui 1.0.12 → 1.0.14
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.css +1 -1
- package/dist/index.js +1897 -1815
- package/dist/types/index.d.ts +73 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -175,6 +175,15 @@ export declare interface CheckboxProps {
|
|
|
175
175
|
indeterminate?: boolean;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
export declare interface ClickOutsideOptions {
|
|
179
|
+
/** 忽略的元素列表,点击这些元素内部不会触发回调(如触发弹窗的按钮) */
|
|
180
|
+
ignore?: ClickOutsideTarget[];
|
|
181
|
+
/** 是否在捕获阶段监听,默认 true,可穿透子元素的 event.stopPropagation() */
|
|
182
|
+
capture?: boolean;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export declare type ClickOutsideTarget = MaybeRef<HTMLElement | null | undefined>;
|
|
186
|
+
|
|
178
187
|
/** 函数式确认弹框,点击确定 resolve,点击取消 reject('cancel') */
|
|
179
188
|
declare function confirm_2(source: ConfirmParam): Promise<void>;
|
|
180
189
|
export { confirm_2 as confirm }
|
|
@@ -280,6 +289,8 @@ export declare interface DividerProps {
|
|
|
280
289
|
length?: string;
|
|
281
290
|
}
|
|
282
291
|
|
|
292
|
+
export declare const getDialogZIndex: () => number;
|
|
293
|
+
|
|
283
294
|
export declare type IconButtonType = 'rectangle' | 'square' | 'circle' | 'professional';
|
|
284
295
|
|
|
285
296
|
export declare const Input: DefineComponent<InputProps, {
|
|
@@ -342,6 +353,8 @@ export declare interface InputProps {
|
|
|
342
353
|
|
|
343
354
|
export declare type LanguageKey = 'zh-CN' | 'zh-TW' | 'en-US';
|
|
344
355
|
|
|
356
|
+
declare type MaybeRef<T> = T | Ref<T>;
|
|
357
|
+
|
|
345
358
|
/** 函数式轻提示,默认停留 1s,可通过对象配置时长;已有提示展示时忽略新调用 */
|
|
346
359
|
export declare function Message(source: MessageParam): void;
|
|
347
360
|
|
|
@@ -546,6 +559,8 @@ export declare interface SelectScrollPayload {
|
|
|
546
559
|
|
|
547
560
|
export declare const setCregisUILocale: (lang: LanguageKey) => void;
|
|
548
561
|
|
|
562
|
+
export declare const setDialogZIndex: (_zIndex: number) => void;
|
|
563
|
+
|
|
549
564
|
declare type Size = 'large' | 'medium' | 'small' | 'extraSmall';
|
|
550
565
|
|
|
551
566
|
declare type Size_2 = 'large' | 'medium' | 'small' | 'extraSmall';
|
|
@@ -678,6 +693,48 @@ export declare type TagSize = 'small' | 'medium' | 'large';
|
|
|
678
693
|
|
|
679
694
|
declare type TagType = 'subtle' | 'solid' | 'gray' | 'strokeSubtle' | 'strokeSolid' | 'danger' | 'warning' | 'success' | 'ready' | 'invalid' | 'apricot' | 'khaki' | 'grass' | 'sage' | 'cyan' | 'iceBlue' | 'periwinkle' | 'lilac' | 'orchid' | 'mallow' | 'rose' | 'coral' | 'mauve' | 'moss' | 'steel' | 'grape' | 'sameWhite' | 'lime';
|
|
680
695
|
|
|
696
|
+
export declare const Timeline: DefineComponent<TimelineProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineProps> & Readonly<{}>, {
|
|
697
|
+
dotSize: number | string;
|
|
698
|
+
dotColor: string;
|
|
699
|
+
lineColor: string;
|
|
700
|
+
lineWidth: number | string;
|
|
701
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
702
|
+
|
|
703
|
+
export declare const TIMELINE_KEY: InjectionKey<TimelineContext>;
|
|
704
|
+
|
|
705
|
+
export declare interface TimelineContext {
|
|
706
|
+
dotSize: Ref<number | string>;
|
|
707
|
+
dotColor: Ref<string>;
|
|
708
|
+
lineColor: Ref<string>;
|
|
709
|
+
lineWidth: Ref<number | string>;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export declare const TimelineItem: DefineComponent<TimelineItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
|
|
713
|
+
contentHoverable: boolean;
|
|
714
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
715
|
+
|
|
716
|
+
export declare interface TimelineItemProps {
|
|
717
|
+
/** 节点圆点直径,可覆盖 Timeline 默认值 */
|
|
718
|
+
dotSize?: number | string;
|
|
719
|
+
/** 节点圆点颜色,可覆盖 Timeline 默认值 */
|
|
720
|
+
dotColor?: string;
|
|
721
|
+
/** 连接线宽度,可覆盖 Timeline 默认值 */
|
|
722
|
+
lineWidth?: number | string;
|
|
723
|
+
/** content 区域是否启用 hover 背景,默认 true */
|
|
724
|
+
contentHoverable?: boolean;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export declare interface TimelineProps {
|
|
728
|
+
/** 节点圆点直径,默认 8 */
|
|
729
|
+
dotSize?: number | string;
|
|
730
|
+
/** 节点圆点颜色,默认绿色 */
|
|
731
|
+
dotColor?: string;
|
|
732
|
+
/** 连接线颜色 */
|
|
733
|
+
lineColor?: string;
|
|
734
|
+
/** 连接线宽度,默认 2 */
|
|
735
|
+
lineWidth?: number | string;
|
|
736
|
+
}
|
|
737
|
+
|
|
681
738
|
export declare type Type = 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
682
739
|
|
|
683
740
|
declare type Type_2 = 'default' | 'plain' | 'noBorder';
|
|
@@ -707,4 +764,20 @@ export declare interface UploadProps {
|
|
|
707
764
|
onChange?: (file: FormData) => void;
|
|
708
765
|
}
|
|
709
766
|
|
|
767
|
+
/**
|
|
768
|
+
* 点击目标元素外部时触发回调的 Hook。
|
|
769
|
+
*
|
|
770
|
+
* - 使用 pointerdown + click 组合,精准区分「拖拽」与「点击外部」
|
|
771
|
+
* - capture 默认开启,不被子节点 stopPropagation 干扰
|
|
772
|
+
* - 支持单个或多个目标元素,支持 ignore 排除列表
|
|
773
|
+
*
|
|
774
|
+
* @example
|
|
775
|
+
* const panelRef = ref<HTMLElement>()
|
|
776
|
+
* useClickOutside(panelRef, () => closePanel())
|
|
777
|
+
*
|
|
778
|
+
* @example
|
|
779
|
+
* useClickOutside([panelRef, triggerRef], callback, { ignore: [buttonRef] })
|
|
780
|
+
*/
|
|
781
|
+
export declare function useClickOutside(target: ClickOutsideTarget | ClickOutsideTarget[], callback: (event: PointerEvent) => void, options?: ClickOutsideOptions): void;
|
|
782
|
+
|
|
710
783
|
export { }
|