@whitesev/pops 1.0.0 → 1.1.0

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 (64) hide show
  1. package/README.md +243 -0
  2. package/dist/index.amd.js +5656 -171
  3. package/dist/index.amd.js.map +1 -1
  4. package/dist/index.cjs.js +5656 -171
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm.js +5656 -171
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/index.iife.js +5656 -171
  9. package/dist/index.iife.js.map +1 -1
  10. package/dist/index.system.js +5656 -171
  11. package/dist/index.system.js.map +1 -1
  12. package/dist/index.umd.js +5656 -171
  13. package/dist/index.umd.js.map +1 -1
  14. package/dist/types/src/Pops.d.ts +148 -60
  15. package/dist/types/src/components/alert/index.d.ts +1 -1
  16. package/dist/types/src/components/alert/indexType.d.ts +16 -0
  17. package/dist/types/src/components/confirm/index.d.ts +1 -1
  18. package/dist/types/src/components/confirm/indexType.d.ts +6 -0
  19. package/dist/types/src/components/drawer/index.d.ts +2 -0
  20. package/dist/types/src/components/drawer/indexType.d.ts +43 -0
  21. package/dist/types/src/components/folder/folderIcon.d.ts +27 -0
  22. package/dist/types/src/components/folder/index.d.ts +2 -0
  23. package/dist/types/src/components/folder/indexType.d.ts +68 -0
  24. package/dist/types/src/components/iframe/index.d.ts +2 -0
  25. package/dist/types/src/components/iframe/indexType.d.ts +120 -0
  26. package/dist/types/src/components/loading/index.d.ts +2 -0
  27. package/dist/types/src/components/loading/indexType.d.ts +23 -0
  28. package/dist/types/src/components/panel/buttonType.d.ts +60 -0
  29. package/dist/types/src/components/panel/commonType.d.ts +46 -0
  30. package/dist/types/src/components/panel/deepMenuType.d.ts +56 -0
  31. package/dist/types/src/components/panel/formsType.d.ts +31 -0
  32. package/dist/types/src/components/panel/index.d.ts +2 -0
  33. package/dist/types/src/components/panel/indexType.d.ts +86 -0
  34. package/dist/types/src/components/panel/inputType.d.ts +61 -0
  35. package/dist/types/src/components/panel/ownType.d.ts +27 -0
  36. package/dist/types/src/components/panel/selectType.d.ts +71 -0
  37. package/dist/types/src/components/panel/sliderType.d.ts +58 -0
  38. package/dist/types/src/components/panel/switchType.d.ts +42 -0
  39. package/dist/types/src/components/panel/textareaType.d.ts +50 -0
  40. package/dist/types/src/components/prompt/index.d.ts +2 -0
  41. package/dist/types/src/components/prompt/indexType.d.ts +37 -0
  42. package/dist/types/src/components/rightClickMenu/index.d.ts +2 -0
  43. package/dist/types/src/components/rightClickMenu/indexType.d.ts +77 -0
  44. package/dist/types/src/components/searchSuggestion/index.d.ts +4 -0
  45. package/dist/types/src/components/searchSuggestion/indexType.d.ts +238 -0
  46. package/dist/types/src/components/tooltip/index.d.ts +2 -0
  47. package/dist/types/src/components/tooltip/indexType.d.ts +91 -0
  48. package/dist/types/src/handler/PopsHandler.d.ts +51 -39
  49. package/{src → dist/types/src}/types/PopsDOMUtilsEventType.d.ts +31 -33
  50. package/{src → dist/types/src}/types/animation.d.ts +1 -1
  51. package/{src → dist/types/src}/types/button.d.ts +21 -11
  52. package/{src → dist/types/src}/types/components.d.ts +9 -9
  53. package/{src → dist/types/src}/types/event.d.ts +6 -4
  54. package/{src → dist/types/src}/types/icon.d.ts +3 -1
  55. package/{src → dist/types/src}/types/layer.d.ts +2 -2
  56. package/{src → dist/types/src}/types/main.d.ts +22 -21
  57. package/{src → dist/types/src}/types/mask.d.ts +1 -1
  58. package/{src → dist/types/src}/types/position.d.ts +3 -3
  59. package/dist/types/src/utils/PopsDOMUtils.d.ts +334 -1
  60. package/dist/types/src/utils/{PopsUIUtils.d.ts → PopsInstanceUtils.d.ts} +13 -12
  61. package/dist/types/src/utils/PopsUtils.d.ts +2 -2
  62. package/package.json +2 -3
  63. package/dist/types/src/utils/PopsDOMUtilsEvent.d.ts +0 -332
  64. /package/{src → dist/types/src}/types/global.d.ts +0 -0
@@ -1,8 +1,8 @@
1
- declare type PopsDOMUtilsEventObject<T extends Node> = Event & {
1
+ export type PopsDOMUtilsEventObject<T extends Node> = Event & {
2
2
  target: T;
3
3
  };
4
4
 
5
- declare type PopsDOMUtilsCreateElementAttributesMap = {
5
+ export type PopsDOMUtilsCreateElementAttributesMap = {
6
6
  style?: string;
7
7
  id?: string;
8
8
  class?: string;
@@ -15,7 +15,7 @@ declare type PopsDOMUtilsCreateElementAttributesMap = {
15
15
  * + https://blog.csdn.net/weixin_68658847/article/details/126939879
16
16
  */
17
17
 
18
- declare interface PopsDOMUtils_MouseEvent {
18
+ export interface PopsDOMUtils_MouseEvent {
19
19
  click: MouseEvent | PointerEvent;
20
20
  contextmenu: MouseEvent | PointerEvent;
21
21
  dblclick: MouseEvent | PointerEvent;
@@ -28,20 +28,20 @@ declare interface PopsDOMUtils_MouseEvent {
28
28
  mouseup: MouseEvent | PointerEvent;
29
29
  hover: MouseEvent;
30
30
  }
31
- declare type PopsDOMUtils_MouseEventType = keyof PopsDOMUtils_MouseEvent;
31
+ export type PopsDOMUtils_MouseEventType = keyof PopsDOMUtils_MouseEvent;
32
32
  /**
33
33
  * 鼠标事件
34
34
  */
35
- declare interface PopsDOMUtils_KeyboardEvent {
35
+ export interface PopsDOMUtils_KeyboardEvent {
36
36
  keydown: KeyboardEvent;
37
37
  keypress: KeyboardEvent;
38
38
  keyup: KeyboardEvent;
39
39
  }
40
- declare type PopsDOMUtils_KeyboardEventType = keyof PopsDOMUtils_KeyboardEvent;
40
+ export type PopsDOMUtils_KeyboardEventType = keyof PopsDOMUtils_KeyboardEvent;
41
41
  /**
42
42
  * 框架/对象事件
43
43
  */
44
- declare interface PopsDOMUtils_Frame_Object_Event {
44
+ export interface PopsDOMUtils_Frame_Object_Event {
45
45
  abort: Event;
46
46
  beforeunload: Event;
47
47
  error: Event;
@@ -53,12 +53,12 @@ declare interface PopsDOMUtils_Frame_Object_Event {
53
53
  scroll: Event;
54
54
  unload: Event;
55
55
  }
56
- declare type PopsDOMUtils_Frame_Object_EventType =
56
+ export type PopsDOMUtils_Frame_Object_EventType =
57
57
  keyof PopsDOMUtils_Frame_Object_Event;
58
58
  /**
59
59
  * 表单事件
60
60
  */
61
- declare interface PopsDOMUtils_FormEvent {
61
+ export interface PopsDOMUtils_FormEvent {
62
62
  blur: Event;
63
63
  change: Event;
64
64
  focus: Event;
@@ -68,32 +68,31 @@ declare interface PopsDOMUtils_FormEvent {
68
68
  reset: Event;
69
69
  search: Event;
70
70
  }
71
- declare type PopsDOMUtils_FormEventType = keyof PopsDOMUtils_FormEvent;
71
+ export type PopsDOMUtils_FormEventType = keyof PopsDOMUtils_FormEvent;
72
72
 
73
73
  /**
74
74
  * 剪贴板事件
75
75
  */
76
- declare interface PopsDOMUtils_ClipboardEvent {
76
+ export interface PopsDOMUtils_ClipboardEvent {
77
77
  copy: ClipboardEvent;
78
78
  cut: ClipboardEvent;
79
79
  paste: ClipboardEvent;
80
80
  }
81
- declare type PopsDOMUtils_ClipboardEventType =
82
- keyof PopsDOMUtils_ClipboardEvent;
81
+ export type PopsDOMUtils_ClipboardEventType = keyof PopsDOMUtils_ClipboardEvent;
83
82
 
84
83
  /**
85
84
  * 打印事件
86
85
  */
87
- declare interface PopsDOMUtils_PrintEvent {
86
+ export interface PopsDOMUtils_PrintEvent {
88
87
  afterprint: Event;
89
88
  beforeprint: Event;
90
89
  }
91
- declare type PopsDOMUtils_PrintEventType = keyof PopsDOMUtils_PrintEvent;
90
+ export type PopsDOMUtils_PrintEventType = keyof PopsDOMUtils_PrintEvent;
92
91
 
93
92
  /**
94
93
  * 拖动事件
95
94
  */
96
- declare interface PopsDOMUtils_DragEvent {
95
+ export interface PopsDOMUtils_DragEvent {
97
96
  drag: DragEvent;
98
97
  dragend: DragEvent;
99
98
  dragenter: DragEvent;
@@ -102,12 +101,12 @@ declare interface PopsDOMUtils_DragEvent {
102
101
  dragstart: DragEvent;
103
102
  drop: DragEvent;
104
103
  }
105
- declare type PopsDOMUtils_DragEventType = keyof PopsDOMUtils_DragEvent;
104
+ export type PopsDOMUtils_DragEventType = keyof PopsDOMUtils_DragEvent;
106
105
 
107
106
  /**
108
107
  * 多媒体(Media)事件
109
108
  */
110
- declare interface PopsDOMUtils_MediaEvent {
109
+ export interface PopsDOMUtils_MediaEvent {
111
110
  abort: Event;
112
111
  canplay: Event;
113
112
  canplaythrough: Event;
@@ -131,32 +130,31 @@ declare interface PopsDOMUtils_MediaEvent {
131
130
  volumechange: Event;
132
131
  waiting: Event;
133
132
  }
134
- declare type PopsDOMUtils_MediaEventType = keyof PopsDOMUtils_MediaEvent;
133
+ export type PopsDOMUtils_MediaEventType = keyof PopsDOMUtils_MediaEvent;
135
134
 
136
135
  /**
137
136
  * 动画事件
138
137
  */
139
- declare interface PopsDOMUtils_AnimationEvent {
138
+ export interface PopsDOMUtils_AnimationEvent {
140
139
  animationend: AnimationEvent;
141
140
  animationiteration: AnimationEvent;
142
141
  animationstart: AnimationEvent;
143
142
  }
144
- declare type PopsDOMUtils_AnimationEventType =
145
- keyof PopsDOMUtils_AnimationEvent;
143
+ export type PopsDOMUtils_AnimationEventType = keyof PopsDOMUtils_AnimationEvent;
146
144
 
147
145
  /**
148
146
  * 过渡事件
149
147
  */
150
- declare interface PopsDOMUtils_TransitionEvent {
148
+ export interface PopsDOMUtils_TransitionEvent {
151
149
  transitionend: TransitionEvent;
152
150
  }
153
- declare type PopsDOMUtils_TransitionEventType =
151
+ export type PopsDOMUtils_TransitionEventType =
154
152
  keyof PopsDOMUtils_TransitionEvent;
155
153
 
156
154
  /**
157
155
  * 触摸事件
158
156
  */
159
- declare interface PopsDOMUtils_TouchEvent {
157
+ export interface PopsDOMUtils_TouchEvent {
160
158
  touchstart: TouchEvent;
161
159
  touchmove: TouchEvent;
162
160
  touchend: TouchEvent;
@@ -164,11 +162,11 @@ declare interface PopsDOMUtils_TouchEvent {
164
162
  touchenter: TouchEvent;
165
163
  touchleave: TouchEvent;
166
164
  }
167
- declare type PopsDOMUtils_TouchEventType = keyof PopsDOMUtils_TouchEvent;
165
+ export type PopsDOMUtils_TouchEventType = keyof PopsDOMUtils_TouchEvent;
168
166
  /**
169
167
  * 其它事件
170
168
  */
171
- declare interface PopsDOMUtils_OtherEvent {
169
+ export interface PopsDOMUtils_OtherEvent {
172
170
  message: Event;
173
171
  online: Event;
174
172
  offline: Event;
@@ -181,12 +179,12 @@ declare interface PopsDOMUtils_OtherEvent {
181
179
  fullscreenchange: Event;
182
180
  DOMContentLoaded: Event;
183
181
  }
184
- declare type PopsDOMUtils_OtherEventType = keyof PopsDOMUtils_OtherEvent;
182
+ export type PopsDOMUtils_OtherEventType = keyof PopsDOMUtils_OtherEvent;
185
183
 
186
184
  /**
187
185
  * 全部事件
188
186
  */
189
- declare type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
187
+ export type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
190
188
  PopsDOMUtils_KeyboardEvent &
191
189
  PopsDOMUtils_Frame_Object_Event &
192
190
  PopsDOMUtils_FormEvent &
@@ -202,12 +200,12 @@ declare type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
202
200
  /**
203
201
  * 事件类型
204
202
  */
205
- declare type PopsDOMUtils_EventType = keyof PopsDOMUtils_Event;
203
+ export type PopsDOMUtils_EventType = keyof PopsDOMUtils_Event;
206
204
 
207
205
  /**
208
206
  * 元素上的events属性
209
207
  */
210
- declare interface PopsDOMUtilsEventListenerOptionsAttribute {
208
+ export interface PopsDOMUtilsEventListenerOptionsAttribute {
211
209
  /**
212
210
  * 自定义的ownCallBack
213
211
  */
@@ -226,7 +224,7 @@ declare interface PopsDOMUtilsEventListenerOptionsAttribute {
226
224
  selector?: string;
227
225
  }
228
226
 
229
- declare type PopsDOMUtilsElementEventType =
227
+ export type PopsDOMUtilsElementEventType =
230
228
  | HTMLElement
231
229
  | string
232
230
  | NodeList
@@ -241,7 +239,7 @@ declare type PopsDOMUtilsElementEventType =
241
239
  | ChildNode
242
240
  | Node;
243
241
 
244
- declare type ParseHTMLReturnType<T1, T2> = T1 extends true
242
+ export type ParseHTMLReturnType<T1, T2> = T1 extends true
245
243
  ? T2 extends true
246
244
  ? Document
247
245
  : HTMLElement
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 动画
3
3
  */
4
- declare type PopsAnimation =
4
+ export type PopsAnimation =
5
5
  | "pops-anim-spread"
6
6
  | "pops-anim-shake"
7
7
  | "pops-anim-rolling-left"
@@ -4,11 +4,11 @@ import type { PopsIcon } from "./icon";
4
4
  /**
5
5
  * 按钮类型
6
6
  */
7
- declare type PopsButtonType = "close" | "ok" | "cancel" | "other";
7
+ export type PopsButtonType = "close" | "ok" | "cancel" | "other";
8
8
  /**
9
9
  * 按钮样式类型
10
10
  */
11
- declare type PopsButtonStyleType =
11
+ export type PopsButtonStyleType =
12
12
  | "default"
13
13
  | "primary"
14
14
  | "xiaomi-primary"
@@ -20,12 +20,12 @@ declare type PopsButtonStyleType =
20
20
  /**
21
21
  * 按钮大小
22
22
  */
23
- declare type PopsButtonSize = "large" | "small";
23
+ export type PopsButtonSize = "large" | "small";
24
24
 
25
25
  /**
26
26
  * 按钮的点击回调参数event
27
27
  */
28
- declare interface PopsBtnCallBackEvent {
28
+ export interface PopsBtnCallBackEvent {
29
29
  /**
30
30
  * 元素
31
31
  */
@@ -71,7 +71,7 @@ declare interface PopsBtnCallBackEvent {
71
71
  /**
72
72
  * 按钮配置
73
73
  */
74
- declare interface PopsButtonDetails {
74
+ export interface PopsButtonDetails<T = {}> {
75
75
  /**
76
76
  * 是否启用按钮
77
77
  */
@@ -104,7 +104,7 @@ declare interface PopsButtonDetails {
104
104
  * 按钮点击的回调
105
105
  */
106
106
  callback(
107
- eventDetails: PopsHandlerEventDetails,
107
+ eventDetails: PopsHandlerEventDetails & T,
108
108
  event: PointerEvent | MouseEvent
109
109
  ): void;
110
110
  }
@@ -112,7 +112,7 @@ declare interface PopsButtonDetails {
112
112
  /**
113
113
  * 按钮配置(匹配任意类型)
114
114
  */
115
- declare interface PopsButtonDetailsAnyType {
115
+ export interface PopsButtonDetailsAnyType<T = {}> {
116
116
  /**
117
117
  * 是否启用按钮
118
118
  */
@@ -145,14 +145,24 @@ declare interface PopsButtonDetailsAnyType {
145
145
  * 按钮点击的回调
146
146
  */
147
147
  callback(
148
- eventDetails: PopsHandlerEventDetails,
148
+ eventDetails: PopsHandlerEventDetails & T,
149
+ event: PointerEvent | MouseEvent
150
+ ): void;
151
+ }
152
+
153
+ /** prompt的点击回调 */
154
+ export interface PopsPromptButtonDetails extends PopsButtonDetails {
155
+ callback(
156
+ eventDetails: PopsHandlerEventDetails & {
157
+ text: string;
158
+ },
149
159
  event: PointerEvent | MouseEvent
150
160
  ): void;
151
161
  }
152
162
  /**
153
163
  * 右上角关闭按钮点击回调的配置
154
164
  */
155
- declare interface PopsHeaderCloseButtonClickCallBackEvent {
165
+ export interface PopsHeaderCloseButtonClickCallBackEvent {
156
166
  /**
157
167
  * 动画元素(包裹着弹窗元素)
158
168
  */
@@ -164,7 +174,7 @@ declare interface PopsHeaderCloseButtonClickCallBackEvent {
164
174
  /**
165
175
  * 按钮调用类型
166
176
  */
167
- type: PopsButtonType;
177
+ type: string;
168
178
  /**
169
179
  * 唯一id
170
180
  */
@@ -189,7 +199,7 @@ declare interface PopsHeaderCloseButtonClickCallBackEvent {
189
199
  /**
190
200
  * 顶部关闭按钮配置
191
201
  */
192
- declare interface PopsHeaderCloseButtonDetails {
202
+ export interface PopsHeaderCloseButtonDetails {
193
203
  /**
194
204
  * 是否启用按钮
195
205
  */
@@ -14,7 +14,7 @@ import type { PopsMaskDetails } from "./mask";
14
14
  /**
15
15
  * 标题配置
16
16
  */
17
- declare interface PopsTitleConfig {
17
+ export interface PopsTitleConfig {
18
18
  title: {
19
19
  /**
20
20
  * 标题文字
@@ -38,7 +38,7 @@ declare interface PopsTitleConfig {
38
38
  /**
39
39
  * 内容配置
40
40
  */
41
- declare interface PopsContentConfig {
41
+ export interface PopsContentConfig {
42
42
  content: {
43
43
  /**
44
44
  * 内容文字
@@ -57,7 +57,7 @@ declare interface PopsContentConfig {
57
57
  /**
58
58
  * 按钮配置
59
59
  */
60
- declare interface PopsButtonConfig {
60
+ export interface PopsButtonConfig {
61
61
  btn?: {
62
62
  /**
63
63
  * 按钮的位置,默认left
@@ -72,7 +72,7 @@ declare interface PopsButtonConfig {
72
72
  /**
73
73
  * 按钮的其它配置
74
74
  */
75
- declare interface PopsMoreButtonConfig {
75
+ export interface PopsMoreButtonConfig<T = {}> {
76
76
  btn?: PopsButtonConfig["btn"] & {
77
77
  /**
78
78
  * 是否合并按钮
@@ -89,21 +89,21 @@ declare interface PopsMoreButtonConfig {
89
89
  /**
90
90
  * 确定按钮
91
91
  */
92
- ok?: Partial<PopsButtonDetails | PopsButtonDetailsAnyType>;
92
+ ok?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
93
93
  /**
94
94
  * 取消按钮
95
95
  */
96
- cancel?: Partial<PopsButtonDetails | PopsButtonDetailsAnyType>;
96
+ cancel?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
97
97
  /**
98
98
  * 其他按钮
99
99
  */
100
- other?: Partial<PopsButtonDetails | PopsButtonDetailsAnyType>;
100
+ other?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
101
101
  };
102
102
  }
103
103
  /**
104
104
  * 拖拽(标题栏)的配置
105
105
  */
106
- declare interface PopsDragConfig {
106
+ export interface PopsDragConfig {
107
107
  /**
108
108
  * 是否可以按钮标题栏进行拖拽,默认false
109
109
  */
@@ -142,7 +142,7 @@ declare interface PopsDragConfig {
142
142
  /**
143
143
  * 通用配置
144
144
  */
145
- declare interface PopsCommonConfig {
145
+ export interface PopsCommonConfig {
146
146
  /**
147
147
  * 自定义的className,默认为空
148
148
  */
@@ -1,7 +1,9 @@
1
+ import type { PopsIframeDetails } from "../components/iframe/indexType";
2
+
1
3
  /**
2
4
  * 事件配置
3
5
  */
4
- declare interface PopsIframeEventDetails {
6
+ export interface PopsIframeEventDetails {
5
7
  /**
6
8
  * 唯一id
7
9
  */
@@ -25,12 +27,12 @@ declare interface PopsIframeEventDetails {
25
27
  /**
26
28
  * 当前配置
27
29
  */
28
- config: any;
30
+ config: PopsIframeDetails;
29
31
  }
30
32
  /**
31
33
  * 事件配置
32
34
  */
33
- declare interface PopsEventDetails {
35
+ export interface PopsEventDetails {
34
36
  /** 最外层包裹的元素 */
35
37
  $shadowContainer: HTMLDivElement;
36
38
  /** ShadowRoot */
@@ -54,7 +56,7 @@ declare interface PopsEventDetails {
54
56
  /**
55
57
  * 处理过的事件配置
56
58
  */
57
- declare interface PopsHandlerEventDetails extends PopsEventDetails {
59
+ export interface PopsHandlerEventDetails extends PopsEventDetails {
58
60
  /** 当前按钮类型 */
59
61
  type: "cancel" | "close" | "ok" | "other";
60
62
  }
@@ -27,4 +27,6 @@ export type PopsIcon =
27
27
  | "circleClose"
28
28
  | "view"
29
29
  | "hide"
30
- | "keyboard";
30
+ | "keyboard"
31
+ | "arrowRight"
32
+ | "arrowLeft";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * config内存储饿实例配置
3
3
  */
4
- declare interface PopsLayerConfig {
4
+ export interface PopsLayerConfig {
5
5
  /** 固定id */
6
6
  guid: string;
7
7
  /** 动画元素 */
@@ -12,7 +12,7 @@ declare interface PopsLayerConfig {
12
12
  maskElement?: HTMLDivElement;
13
13
  }
14
14
 
15
- declare interface PopsLayerCommonConfig extends PopsLayerConfig {
15
+ export interface PopsLayerCommonConfig extends PopsLayerConfig {
16
16
  /** shadow容器 */
17
17
  $shadowContainer: HTMLDivElement;
18
18
  /** shadow容器的shandowRoot */
@@ -1,18 +1,18 @@
1
- import type { PopsAlertDetails } from "../components/alert/types";
2
- import type { PopsConfirmDetails } from "../components/confirm/types";
3
- import type { PopsDrawerDetails } from "../components/drawer/types";
4
- import type { PopsFolderDetails } from "../components/folder/types";
5
- import type { PopsIframeDetails } from "../components/iframe/types";
6
- import type { PopsLoadingDetails } from "../components/loading/types";
7
- import type { PopsPanelDetails } from "../components/panel/types";
8
- import type { PopsPromptDetails } from "../components/prompt/types";
1
+ import type { PopsAlertDetails } from "../components/alert/indexType";
2
+ import type { PopsConfirmDetails } from "../components/confirm/indexType";
3
+ import type { PopsDrawerDetails } from "../components/drawer/indexType";
4
+ import type { PopsFolderDetails } from "../components/folder/indexType";
5
+ import type { PopsIframeDetails } from "../components/iframe/indexType";
6
+ import type { PopsLoadingDetails } from "../components/loading/indexType";
7
+ import type { PopsPanelDetails } from "../components/panel/indexType";
8
+ import type { PopsPromptDetails } from "../components/prompt/indexType";
9
9
 
10
- declare interface PopsUtilsOwnObject<V extends any> {
10
+ export interface PopsUtilsOwnObject<V extends any> {
11
11
  [key: string]: V | PopsUtilsOwnObject<V>;
12
12
  }
13
13
 
14
14
  /** pops的类型 8个 */
15
- declare type PopsType =
15
+ export type PopsType =
16
16
  | "alert"
17
17
  | "confirm"
18
18
  | "prompt"
@@ -25,13 +25,13 @@ declare type PopsType =
25
25
  // | "rightClickMenu";
26
26
 
27
27
  /** pops所有的类型 10个 */
28
- declare type PopsMode = PopsType | "tooltip" | "rightClickMenu";
28
+ export type PopsMode = PopsType | "tooltip" | "rightClickMenu";
29
29
 
30
30
  /** 存储实例的类型 9个 */
31
- declare type PopsLayerMode = PopsType | "tooltip";
31
+ export type PopsLayerMode = PopsType | "tooltip";
32
32
 
33
33
  /** pops弹窗支持动画元素的配置 */
34
- declare interface PopsSupportAnim {
34
+ export interface PopsSupportAnim {
35
35
  alert: PopsAlertDetails;
36
36
  confirm: PopsConfirmDetails;
37
37
  prompt: PopsPromptDetails;
@@ -42,10 +42,10 @@ declare interface PopsSupportAnim {
42
42
  panel: PopsPanelDetails;
43
43
  }
44
44
  /** pops弹窗支持动画元素的类型 */
45
- declare type PopsTypeSupportAnim = keyof PopsSupportAnim;
45
+ export type PopsTypeSupportAnim = keyof PopsSupportAnim;
46
46
 
47
47
  /** pops弹窗支持标题栏的配置 */
48
- declare interface PopsSupportHeaderTitle {
48
+ export interface PopsSupportHeaderTitle {
49
49
  alert: PopsAlertDetails;
50
50
  confirm: PopsConfirmDetails;
51
51
  prompt: PopsPromptDetails;
@@ -55,30 +55,31 @@ declare interface PopsSupportHeaderTitle {
55
55
  panel: PopsPanelDetails;
56
56
  }
57
57
  /** pops弹窗支持标题栏的类型 */
58
- declare type PopsTypeSupportHeaderTitle = keyof PopsSupportHeaderTitle;
58
+ export type PopsTypeSupportHeaderTitle = keyof PopsSupportHeaderTitle;
59
59
 
60
60
  /** pops支持底部按钮的配置 */
61
- declare interface PopsSupportBottomBtn {
61
+ export interface PopsSupportBottomBtn {
62
62
  alert: PopsAlertDetails;
63
63
  confirm: PopsConfirmDetails;
64
64
  prompt: PopsPromptDetails;
65
65
  drawer: PopsDrawerDetails;
66
66
  }
67
67
  /** pops支持底部按钮的类型 */
68
- declare type PopsTypeSupportBottomBtn = keyof PopsSupportHeaderTitle;
68
+ export type PopsTypeSupportBottomBtn = keyof PopsSupportHeaderTitle;
69
69
 
70
70
  /** pops支持中间内容的配置 */
71
- declare interface PopsSupportContent {
71
+ export interface PopsSupportContent {
72
72
  alert: PopsAlertDetails;
73
73
  confirm: PopsConfirmDetails;
74
74
  prompt: PopsPromptDetails;
75
75
  drawer: PopsDrawerDetails;
76
+ loading: PopsLoadingDetails;
76
77
  }
77
78
  /** pops支持中间内容的类型 */
78
- declare type PopsTypeSupportContent = keyof PopsSupportHeaderTitle;
79
+ export type PopsTypeSupportContent = keyof PopsSupportContent;
79
80
 
80
81
  /** panel的各种类型的配置项 */
81
- declare type PopsPanelFormsTotalDetails =
82
+ export type PopsPanelFormsTotalDetails =
82
83
  | PopsPanelSwitchDetails
83
84
  | PopsPanelSliderDetails
84
85
  | PopsPanelInputDetails
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 遮罩层配置
3
3
  */
4
- declare interface PopsMaskDetails {
4
+ export interface PopsMaskDetails {
5
5
  /**
6
6
  * 是否启用遮罩层,默认false
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 弹窗位置
3
3
  */
4
- declare type PopsPosition =
4
+ export type PopsPosition =
5
5
  | "top_left"
6
6
  | "top"
7
7
  | "top_right"
@@ -15,7 +15,7 @@ declare type PopsPosition =
15
15
  /**
16
16
  * 按钮位置
17
17
  */
18
- declare type PopsJustifyContent =
18
+ export type PopsJustifyContent =
19
19
  | "center"
20
20
  | "end"
21
21
  | "flex-end"
@@ -37,7 +37,7 @@ declare type PopsJustifyContent =
37
37
  /**
38
38
  * text-align
39
39
  */
40
- declare type PopsTextAlign =
40
+ export type PopsTextAlign =
41
41
  | "center"
42
42
  | "end"
43
43
  | "justify"