@whitesev/pops 2.0.6 → 2.0.7

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 (56) hide show
  1. package/dist/index.amd.js +127 -74
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +127 -74
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +127 -74
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +127 -74
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +127 -74
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +127 -74
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +20411 -15
  14. package/dist/types/src/components/alert/index.d.ts +3 -3
  15. package/dist/types/src/components/confirm/index.d.ts +3 -3
  16. package/dist/types/src/components/drawer/index.d.ts +3 -3
  17. package/dist/types/src/components/drawer/indexType.d.ts +10 -2
  18. package/dist/types/src/components/folder/index.d.ts +3 -3
  19. package/dist/types/src/components/folder/indexType.d.ts +4 -1
  20. package/dist/types/src/components/iframe/index.d.ts +6 -3
  21. package/dist/types/src/components/iframe/indexType.d.ts +2 -0
  22. package/dist/types/src/components/loading/index.d.ts +3 -3
  23. package/dist/types/src/components/loading/indexType.d.ts +3 -1
  24. package/dist/types/src/components/panel/index.d.ts +3 -3
  25. package/dist/types/src/components/panel/indexType.d.ts +1 -0
  26. package/dist/types/src/components/panel/sliderType.d.ts +14 -4
  27. package/dist/types/src/components/prompt/index.d.ts +3 -3
  28. package/dist/types/src/components/prompt/indexType.d.ts +1 -0
  29. package/dist/types/src/components/rightClickMenu/index.d.ts +20315 -3
  30. package/dist/types/src/components/rightClickMenu/indexType.d.ts +6 -2
  31. package/dist/types/src/components/searchSuggestion/index.d.ts +141 -3
  32. package/dist/types/src/components/searchSuggestion/indexType.d.ts +0 -108
  33. package/dist/types/src/components/tooltip/index.d.ts +51 -3
  34. package/package.json +1 -1
  35. package/src/Pops.ts +25 -24
  36. package/src/components/alert/index.ts +6 -5
  37. package/src/components/confirm/index.ts +6 -5
  38. package/src/components/drawer/index.ts +6 -5
  39. package/src/components/drawer/indexType.ts +10 -2
  40. package/src/components/folder/index.ts +6 -5
  41. package/src/components/folder/indexType.ts +4 -1
  42. package/src/components/iframe/index.ts +4 -4
  43. package/src/components/iframe/indexType.ts +2 -0
  44. package/src/components/loading/index.ts +6 -5
  45. package/src/components/loading/indexType.ts +3 -1
  46. package/src/components/panel/PanelHandleContentDetails.ts +62 -29
  47. package/src/components/panel/index.ts +6 -5
  48. package/src/components/panel/indexType.ts +1 -0
  49. package/src/components/panel/sliderType.ts +14 -4
  50. package/src/components/prompt/index.ts +6 -5
  51. package/src/components/prompt/indexType.ts +1 -0
  52. package/src/components/rightClickMenu/index.ts +4 -5
  53. package/src/components/rightClickMenu/indexType.ts +6 -7
  54. package/src/components/searchSuggestion/index.ts +4 -4
  55. package/src/components/searchSuggestion/indexType.ts +0 -109
  56. package/src/components/tooltip/index.ts +9 -9
@@ -1,4 +1,4 @@
1
1
  import type { PopsAlertDetails } from "./indexType";
2
- export declare class PopsAlert {
3
- constructor(details: PopsAlertDetails);
4
- }
2
+ export declare const PopsAlert: {
3
+ init(details: PopsAlertDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -1,4 +1,4 @@
1
1
  import type { PopsConfirmDetails } from "./indexType";
2
- export declare class PopsConfirm {
3
- constructor(details: PopsConfirmDetails);
4
- }
2
+ export declare const PopsConfirm: {
3
+ init(details: PopsConfirmDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -1,4 +1,4 @@
1
1
  import type { PopsDrawerDetails } from "./indexType";
2
- export declare class PopsDrawer {
3
- constructor(details: PopsDrawerDetails);
4
- }
2
+ export declare const PopsDrawer: {
3
+ init(details: PopsDrawerDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -8,36 +8,44 @@ export interface PopsDrawerDetails extends PopsContentConfig, PopsMoreButtonConf
8
8
  */
9
9
  title?: Partial<PopsTitleConfig["title"]> & {
10
10
  /**
11
- * 是否启用,默认true
11
+ * 是否启用
12
+ * @default true
12
13
  */
13
14
  enable: boolean;
14
15
  };
15
16
  /**
16
- * 打开的方向,默认为right
17
+ * 打开的方向
18
+ * @default "right"
17
19
  */
18
20
  direction?: "top" | "bottom" | "left" | "right";
19
21
  /**
20
22
  * 窗体的大小; 当使用 number 类型时; 以像素为单位,默认为30%
23
+ * @default "30%"
21
24
  */
22
25
  size?: string | number;
23
26
  /**
24
27
  * 是否在 Drawer 出现时将 body 滚动锁定,默认为false
28
+ * @default false
25
29
  */
26
30
  lockScroll?: boolean;
27
31
  /**
28
32
  * 是否可以通过按下 ESC 关闭 Drawer,默认为true
33
+ * @default true'
29
34
  */
30
35
  closeOnPressEscape?: boolean;
31
36
  /**
32
37
  * 打开的延时时间,单位毫秒,默认为0
38
+ * @default 0
33
39
  */
34
40
  openDelay?: number;
35
41
  /**
36
42
  * 关闭的延时时间,单位毫秒,默认为0
43
+ * @default 0
37
44
  */
38
45
  closeDelay?: number;
39
46
  /**
40
47
  * border-radius,根据direction自动适应,默认为5
48
+ * @default 5
41
49
  */
42
50
  borderRadius?: number;
43
51
  }
@@ -1,4 +1,4 @@
1
1
  import type { PopsFolderDetails } from "./indexType";
2
- export declare class PopsFolder {
3
- constructor(details: PopsFolderDetails);
4
- }
2
+ export declare const PopsFolder: {
3
+ init(details: PopsFolderDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -54,10 +54,13 @@ export interface PopsFolderDetails extends PopsTitleConfig, PopsDragConfig, Pops
54
54
  name: "fileName" | "fileSize" | "latestTime";
55
55
  /**
56
56
  * 是否降序,默认false(升序)
57
+ * @default false
57
58
  */
58
59
  isDesc: boolean;
59
60
  /**
60
- * 触发排序的回调,如果返回true,则中止内部的排序
61
+ * 触发排序的回调
62
+ * @returns
63
+ * + true 中止内部的排序
61
64
  */
62
65
  callback?: (targert: HTMLElement, event: PointerEvent | MouseEvent, sortName: "fileName" | "fileSize" | "latestTime", sortDesc: boolean) => boolean | undefined | void;
63
66
  };
@@ -1,4 +1,7 @@
1
+ import type { PopsEventDetails } from "../../types/event";
1
2
  import type { PopsIframeDetails } from "./indexType";
2
- export declare class PopsIframe {
3
- constructor(details: PopsIframeDetails);
4
- }
3
+ export declare const PopsIframe: {
4
+ init(details: PopsIframeDetails): Omit<PopsEventDetails & {
5
+ iframeElement: HTMLIFrameElement;
6
+ }, "function" | "type">;
7
+ };
@@ -101,6 +101,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
101
101
  };
102
102
  /**
103
103
  * 加载的地址,默认为window.location.href
104
+ * @default window.location.href
104
105
  */
105
106
  url?: string;
106
107
  /**
@@ -109,6 +110,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
109
110
  topRightButton: "min|max|mise|close";
110
111
  /**
111
112
  * 是否启用沙箱,默认false
113
+ * @default false
112
114
  */
113
115
  sandbox?: boolean;
114
116
  /**
@@ -1,4 +1,4 @@
1
1
  import type { PopsLoadingDetails } from "./indexType";
2
- export declare class PopsLoading {
3
- constructor(details: PopsLoadingDetails);
4
- }
2
+ export declare const PopsLoading: {
3
+ init(details: PopsLoadingDetails): Omit<Omit<import("../../types/event").PopsEventDetails, "$shadowContainer" | "$shadowRoot">, "function" | "type">;
4
+ };
@@ -5,8 +5,9 @@ import type { PopsCommonConfig, PopsContentConfig } from "../../types/components
5
5
  export interface PopsLoadingDetails extends Omit<PopsCommonConfig, "width" | "height" | "position" | "beforeAppendToPageCallBack"> {
6
6
  /**
7
7
  * 父元素,默认为document.body
8
+ * @default document.body
8
9
  */
9
- parent: HTMLElement;
10
+ parent?: HTMLElement;
10
11
  /**
11
12
  * 内容配置
12
13
  */
@@ -18,6 +19,7 @@ export interface PopsLoadingDetails extends Omit<PopsCommonConfig, "width" | "he
18
19
  };
19
20
  /**
20
21
  * (可选)添加主CSS,默认为true,当页面中存在anim覆盖时,可能会有一些样式问题,取消添加该CSS即可解决
22
+ * @default true
21
23
  */
22
24
  addIndexCSS?: boolean;
23
25
  /**
@@ -1,4 +1,4 @@
1
1
  import type { PopsPanelDetails } from "./indexType";
2
- export declare class PopsPanel {
3
- constructor(details: PopsPanelDetails);
4
- }
2
+ export declare const PopsPanel: {
3
+ init(details: PopsPanelDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -101,6 +101,7 @@ export interface PopsPanelDetails extends PopsTitleConfig, PopsDragConfig, PopsC
101
101
  * 是否强制是移动端,默认false
102
102
  * + true 强制为移动端
103
103
  * + false 自动根据UA判断是否是移动端
104
+ * @default false
104
105
  */
105
106
  isMobile?: boolean;
106
107
  }
@@ -4,17 +4,18 @@ import type { PopsPanelCommonDetails } from "./commonType";
4
4
  */
5
5
  export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanelSliderDetails> {
6
6
  /**
7
- * (可选)className属性
7
+ * className属性
8
+ * @default ""
8
9
  */
9
10
  className?: string;
10
11
  /**
11
- * (可选)自定义元素属性
12
+ * 自定义元素属性
12
13
  */
13
14
  attributes?: {
14
15
  [key: string]: any;
15
16
  };
16
17
  /**
17
- * (可选)自定义属性
18
+ * 自定义属性
18
19
  */
19
20
  props?: {
20
21
  [K in keyof HTMLElement]?: HTMLElement[K];
@@ -25,16 +26,24 @@ export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanel
25
26
  text: string;
26
27
  /**
27
28
  * (可选)左边的文字下面的描述
29
+ * @default ""
28
30
  */
29
31
  description?: string;
30
32
  /**
31
33
  * 类型
34
+ * @default "slider"
32
35
  */
33
36
  type: "slider";
34
37
  /**
35
38
  * (可选)是否禁用
39
+ * @default false
36
40
  */
37
- disabled?: false;
41
+ disabled?: boolean | (() => boolean);
42
+ /**
43
+ * 是否显示滑块的hover提示
44
+ * @default true
45
+ */
46
+ isShowHoverTip?: boolean | (() => boolean);
38
47
  /**
39
48
  * 获取该项的值的回调函数
40
49
  */
@@ -57,6 +66,7 @@ export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanel
57
66
  max: number;
58
67
  /**
59
68
  * (可选)每次滑动的间隔值
69
+ * @default 1
60
70
  */
61
71
  step?: number;
62
72
  }
@@ -1,4 +1,4 @@
1
1
  import type { PopsPromptDetails } from "./indexType";
2
- export declare class PopsPrompt {
3
- constructor(details: PopsPromptDetails);
4
- }
2
+ export declare const PopsPrompt: {
3
+ init(details: PopsPromptDetails): Omit<import("../../types/event").PopsEventDetails, "function" | "type">;
4
+ };
@@ -34,6 +34,7 @@ export interface PopsPromptDetails extends PopsTitleConfig, PopsDragConfig, Pops
34
34
  select?: boolean;
35
35
  /**
36
36
  * 输入框内的提示文字
37
+ * @default ""
37
38
  */
38
39
  placeholder?: string;
39
40
  /**