sard-uniapp 1.25.5 → 1.25.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 (49) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/components/action-sheet/README.md +106 -12
  3. package/components/action-sheet/action-sheet.d.ts +2 -1
  4. package/components/action-sheet/action-sheet.vue +47 -11
  5. package/components/action-sheet/common.d.ts +51 -12
  6. package/components/action-sheet-agent/action-sheet-agent.d.ts +35 -0
  7. package/components/action-sheet-agent/action-sheet-agent.vue +194 -0
  8. package/components/action-sheet-agent/common.d.ts +613 -0
  9. package/components/action-sheet-agent/common.js +35 -0
  10. package/components/action-sheet-agent/index.d.ts +1 -0
  11. package/components/action-sheet-agent/index.js +1 -0
  12. package/components/config/index.d.ts +2 -0
  13. package/components/config/index.js +5 -0
  14. package/components/crop-image/crop-image.vue +7 -1
  15. package/components/dialog/dialog.d.ts +1 -1
  16. package/components/dialog/dialog.vue +11 -5
  17. package/components/dialog-agent/dialog-agent.d.ts +11 -11
  18. package/components/locale/lang/ar-SA.d.ts +3 -0
  19. package/components/locale/lang/ar-SA.js +3 -0
  20. package/components/locale/lang/en-US.d.ts +3 -0
  21. package/components/locale/lang/en-US.js +3 -0
  22. package/components/locale/lang/vi-VN.d.ts +3 -0
  23. package/components/locale/lang/vi-VN.js +3 -0
  24. package/components/locale/lang/zh-CN.d.ts +3 -0
  25. package/components/locale/lang/zh-CN.js +3 -0
  26. package/components/notice-bar/notice-bar.vue +5 -3
  27. package/components/notify/notify.vue +1 -0
  28. package/components/notify-agent/notify-agent.d.ts +1 -1
  29. package/components/popout/README.md +41 -37
  30. package/components/popout/common.d.ts +47 -0
  31. package/components/popout/popout.d.ts +2 -1
  32. package/components/popout/popout.vue +15 -3
  33. package/components/popup/README.md +30 -28
  34. package/components/popup/common.d.ts +31 -0
  35. package/components/popup/popup.d.ts +1 -0
  36. package/components/popup/popup.vue +60 -6
  37. package/components/resize-sensor/resize-sensor.vue +1 -1
  38. package/components/share-sheet/share-sheet.vue +8 -1
  39. package/components/toast/toast.vue +1 -0
  40. package/global.d.ts +2 -0
  41. package/index.d.ts +1 -0
  42. package/index.js +1 -0
  43. package/package.json +23 -23
  44. package/use/index.d.ts +1 -0
  45. package/use/index.js +1 -0
  46. package/use/useTopPopup.d.ts +8 -0
  47. package/use/useTopPopup.js +82 -0
  48. package/utils/string.d.ts +0 -3
  49. package/utils/string.js +6 -2
@@ -0,0 +1,613 @@
1
+ import { type ActionSheetProps, type ActionSheetEmits, type ActionSheetItem } from '../action-sheet/common';
2
+ import { type TransitionHookCallbacks } from '../popup/common';
3
+ export interface ActionSheetAgentProps extends ActionSheetProps, TransitionHookCallbacks {
4
+ id?: string;
5
+ onClose?: () => void;
6
+ onCancel?: () => void;
7
+ onSelect?: (item: ActionSheetItem, index: number) => void;
8
+ }
9
+ export declare const defaultActionSheetAgentProps: () => {
10
+ id?: (string | ((props: {
11
+ id: string;
12
+ onClose: () => void;
13
+ onCancel: () => void;
14
+ onSelect: (item: ActionSheetItem, index: number) => void;
15
+ rootStyle: import("vue").StyleValue;
16
+ rootClass: string;
17
+ description: string;
18
+ itemList: ActionSheetItem[];
19
+ cancel: string;
20
+ showCancel: boolean;
21
+ visible: boolean;
22
+ overlayClosable: boolean;
23
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
24
+ duration: number;
25
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
26
+ onBeforeEnter: () => void;
27
+ onEnter: () => void;
28
+ onAfterEnter: () => void;
29
+ onEnterCancelled: () => void;
30
+ onBeforeLeave: () => void;
31
+ onLeave: () => void;
32
+ onAfterLeave: () => void;
33
+ onLeaveCancelled: () => void;
34
+ }) => string)) | undefined;
35
+ onClose?: ((() => void) | ((props: {
36
+ id: string;
37
+ onClose: () => void;
38
+ onCancel: () => void;
39
+ onSelect: (item: ActionSheetItem, index: number) => void;
40
+ rootStyle: import("vue").StyleValue;
41
+ rootClass: string;
42
+ description: string;
43
+ itemList: ActionSheetItem[];
44
+ cancel: string;
45
+ showCancel: boolean;
46
+ visible: boolean;
47
+ overlayClosable: boolean;
48
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
49
+ duration: number;
50
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
51
+ onBeforeEnter: () => void;
52
+ onEnter: () => void;
53
+ onAfterEnter: () => void;
54
+ onEnterCancelled: () => void;
55
+ onBeforeLeave: () => void;
56
+ onLeave: () => void;
57
+ onAfterLeave: () => void;
58
+ onLeaveCancelled: () => void;
59
+ }) => () => void)) | undefined;
60
+ onCancel?: ((() => void) | ((props: {
61
+ id: string;
62
+ onClose: () => void;
63
+ onCancel: () => void;
64
+ onSelect: (item: ActionSheetItem, index: number) => void;
65
+ rootStyle: import("vue").StyleValue;
66
+ rootClass: string;
67
+ description: string;
68
+ itemList: ActionSheetItem[];
69
+ cancel: string;
70
+ showCancel: boolean;
71
+ visible: boolean;
72
+ overlayClosable: boolean;
73
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
74
+ duration: number;
75
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
76
+ onBeforeEnter: () => void;
77
+ onEnter: () => void;
78
+ onAfterEnter: () => void;
79
+ onEnterCancelled: () => void;
80
+ onBeforeLeave: () => void;
81
+ onLeave: () => void;
82
+ onAfterLeave: () => void;
83
+ onLeaveCancelled: () => void;
84
+ }) => () => void)) | undefined;
85
+ onSelect?: (((item: ActionSheetItem, index: number) => void) | ((props: {
86
+ id: string;
87
+ onClose: () => void;
88
+ onCancel: () => void;
89
+ onSelect: (item: ActionSheetItem, index: number) => void;
90
+ rootStyle: import("vue").StyleValue;
91
+ rootClass: string;
92
+ description: string;
93
+ itemList: ActionSheetItem[];
94
+ cancel: string;
95
+ showCancel: boolean;
96
+ visible: boolean;
97
+ overlayClosable: boolean;
98
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
99
+ duration: number;
100
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
101
+ onBeforeEnter: () => void;
102
+ onEnter: () => void;
103
+ onAfterEnter: () => void;
104
+ onEnterCancelled: () => void;
105
+ onBeforeLeave: () => void;
106
+ onLeave: () => void;
107
+ onAfterLeave: () => void;
108
+ onLeaveCancelled: () => void;
109
+ }) => (item: ActionSheetItem, index: number) => void)) | undefined;
110
+ rootStyle?: string | false | ((props: {
111
+ id: string;
112
+ onClose: () => void;
113
+ onCancel: () => void;
114
+ onSelect: (item: ActionSheetItem, index: number) => void;
115
+ rootStyle: import("vue").StyleValue;
116
+ rootClass: string;
117
+ description: string;
118
+ itemList: ActionSheetItem[];
119
+ cancel: string;
120
+ showCancel: boolean;
121
+ visible: boolean;
122
+ overlayClosable: boolean;
123
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
124
+ duration: number;
125
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
126
+ onBeforeEnter: () => void;
127
+ onEnter: () => void;
128
+ onAfterEnter: () => void;
129
+ onEnterCancelled: () => void;
130
+ onBeforeLeave: () => void;
131
+ onLeave: () => void;
132
+ onAfterLeave: () => void;
133
+ onLeaveCancelled: () => void;
134
+ }) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | null | undefined;
135
+ rootClass?: string | ((props: {
136
+ id: string;
137
+ onClose: () => void;
138
+ onCancel: () => void;
139
+ onSelect: (item: ActionSheetItem, index: number) => void;
140
+ rootStyle: import("vue").StyleValue;
141
+ rootClass: string;
142
+ description: string;
143
+ itemList: ActionSheetItem[];
144
+ cancel: string;
145
+ showCancel: boolean;
146
+ visible: boolean;
147
+ overlayClosable: boolean;
148
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
149
+ duration: number;
150
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
151
+ onBeforeEnter: () => void;
152
+ onEnter: () => void;
153
+ onAfterEnter: () => void;
154
+ onEnterCancelled: () => void;
155
+ onBeforeLeave: () => void;
156
+ onLeave: () => void;
157
+ onAfterLeave: () => void;
158
+ onLeaveCancelled: () => void;
159
+ }) => string) | undefined;
160
+ description?: string | ((props: {
161
+ id: string;
162
+ onClose: () => void;
163
+ onCancel: () => void;
164
+ onSelect: (item: ActionSheetItem, index: number) => void;
165
+ rootStyle: import("vue").StyleValue;
166
+ rootClass: string;
167
+ description: string;
168
+ itemList: ActionSheetItem[];
169
+ cancel: string;
170
+ showCancel: boolean;
171
+ visible: boolean;
172
+ overlayClosable: boolean;
173
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
174
+ duration: number;
175
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
176
+ onBeforeEnter: () => void;
177
+ onEnter: () => void;
178
+ onAfterEnter: () => void;
179
+ onEnterCancelled: () => void;
180
+ onBeforeLeave: () => void;
181
+ onLeave: () => void;
182
+ onAfterLeave: () => void;
183
+ onLeaveCancelled: () => void;
184
+ }) => string) | undefined;
185
+ itemList?: ((props: {
186
+ id: string;
187
+ onClose: () => void;
188
+ onCancel: () => void;
189
+ onSelect: (item: ActionSheetItem, index: number) => void;
190
+ rootStyle: import("vue").StyleValue;
191
+ rootClass: string;
192
+ description: string;
193
+ itemList: ActionSheetItem[];
194
+ cancel: string;
195
+ showCancel: boolean;
196
+ visible: boolean;
197
+ overlayClosable: boolean;
198
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
199
+ duration: number;
200
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
201
+ onBeforeEnter: () => void;
202
+ onEnter: () => void;
203
+ onAfterEnter: () => void;
204
+ onEnterCancelled: () => void;
205
+ onBeforeLeave: () => void;
206
+ onLeave: () => void;
207
+ onAfterLeave: () => void;
208
+ onLeaveCancelled: () => void;
209
+ }) => ActionSheetItem[]) | undefined;
210
+ cancel?: string | ((props: {
211
+ id: string;
212
+ onClose: () => void;
213
+ onCancel: () => void;
214
+ onSelect: (item: ActionSheetItem, index: number) => void;
215
+ rootStyle: import("vue").StyleValue;
216
+ rootClass: string;
217
+ description: string;
218
+ itemList: ActionSheetItem[];
219
+ cancel: string;
220
+ showCancel: boolean;
221
+ visible: boolean;
222
+ overlayClosable: boolean;
223
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
224
+ duration: number;
225
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
226
+ onBeforeEnter: () => void;
227
+ onEnter: () => void;
228
+ onAfterEnter: () => void;
229
+ onEnterCancelled: () => void;
230
+ onBeforeLeave: () => void;
231
+ onLeave: () => void;
232
+ onAfterLeave: () => void;
233
+ onLeaveCancelled: () => void;
234
+ }) => string) | undefined;
235
+ showCancel?: boolean | ((props: {
236
+ id: string;
237
+ onClose: () => void;
238
+ onCancel: () => void;
239
+ onSelect: (item: ActionSheetItem, index: number) => void;
240
+ rootStyle: import("vue").StyleValue;
241
+ rootClass: string;
242
+ description: string;
243
+ itemList: ActionSheetItem[];
244
+ cancel: string;
245
+ showCancel: boolean;
246
+ visible: boolean;
247
+ overlayClosable: boolean;
248
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
249
+ duration: number;
250
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
251
+ onBeforeEnter: () => void;
252
+ onEnter: () => void;
253
+ onAfterEnter: () => void;
254
+ onEnterCancelled: () => void;
255
+ onBeforeLeave: () => void;
256
+ onLeave: () => void;
257
+ onAfterLeave: () => void;
258
+ onLeaveCancelled: () => void;
259
+ }) => boolean) | undefined;
260
+ visible?: boolean | ((props: {
261
+ id: string;
262
+ onClose: () => void;
263
+ onCancel: () => void;
264
+ onSelect: (item: ActionSheetItem, index: number) => void;
265
+ rootStyle: import("vue").StyleValue;
266
+ rootClass: string;
267
+ description: string;
268
+ itemList: ActionSheetItem[];
269
+ cancel: string;
270
+ showCancel: boolean;
271
+ visible: boolean;
272
+ overlayClosable: boolean;
273
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
274
+ duration: number;
275
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
276
+ onBeforeEnter: () => void;
277
+ onEnter: () => void;
278
+ onAfterEnter: () => void;
279
+ onEnterCancelled: () => void;
280
+ onBeforeLeave: () => void;
281
+ onLeave: () => void;
282
+ onAfterLeave: () => void;
283
+ onLeaveCancelled: () => void;
284
+ }) => boolean) | undefined;
285
+ overlayClosable?: boolean | ((props: {
286
+ id: string;
287
+ onClose: () => void;
288
+ onCancel: () => void;
289
+ onSelect: (item: ActionSheetItem, index: number) => void;
290
+ rootStyle: import("vue").StyleValue;
291
+ rootClass: string;
292
+ description: string;
293
+ itemList: ActionSheetItem[];
294
+ cancel: string;
295
+ showCancel: boolean;
296
+ visible: boolean;
297
+ overlayClosable: boolean;
298
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
299
+ duration: number;
300
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
301
+ onBeforeEnter: () => void;
302
+ onEnter: () => void;
303
+ onAfterEnter: () => void;
304
+ onEnterCancelled: () => void;
305
+ onBeforeLeave: () => void;
306
+ onLeave: () => void;
307
+ onAfterLeave: () => void;
308
+ onLeaveCancelled: () => void;
309
+ }) => boolean) | undefined;
310
+ beforeClose?: import("../action-sheet/common").ActionSheetBeforeClose | ((props: {
311
+ id: string;
312
+ onClose: () => void;
313
+ onCancel: () => void;
314
+ onSelect: (item: ActionSheetItem, index: number) => void;
315
+ rootStyle: import("vue").StyleValue;
316
+ rootClass: string;
317
+ description: string;
318
+ itemList: ActionSheetItem[];
319
+ cancel: string;
320
+ showCancel: boolean;
321
+ visible: boolean;
322
+ overlayClosable: boolean;
323
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
324
+ duration: number;
325
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
326
+ onBeforeEnter: () => void;
327
+ onEnter: () => void;
328
+ onAfterEnter: () => void;
329
+ onEnterCancelled: () => void;
330
+ onBeforeLeave: () => void;
331
+ onLeave: () => void;
332
+ onAfterLeave: () => void;
333
+ onLeaveCancelled: () => void;
334
+ }) => ((type: "close" | "cancel", loading: {
335
+ readonly cancel: boolean;
336
+ readonly select: boolean;
337
+ readonly close: boolean;
338
+ }) => any | Promise<any>) & ((type: "select", item: ActionSheetItem, index: number, loading: {
339
+ readonly cancel: boolean;
340
+ readonly select: boolean;
341
+ readonly close: boolean;
342
+ }) => any | Promise<any>)) | undefined;
343
+ duration?: number | ((props: {
344
+ id: string;
345
+ onClose: () => void;
346
+ onCancel: () => void;
347
+ onSelect: (item: ActionSheetItem, index: number) => void;
348
+ rootStyle: import("vue").StyleValue;
349
+ rootClass: string;
350
+ description: string;
351
+ itemList: ActionSheetItem[];
352
+ cancel: string;
353
+ showCancel: boolean;
354
+ visible: boolean;
355
+ overlayClosable: boolean;
356
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
357
+ duration: number;
358
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
359
+ onBeforeEnter: () => void;
360
+ onEnter: () => void;
361
+ onAfterEnter: () => void;
362
+ onEnterCancelled: () => void;
363
+ onBeforeLeave: () => void;
364
+ onLeave: () => void;
365
+ onAfterLeave: () => void;
366
+ onLeaveCancelled: () => void;
367
+ }) => number) | undefined;
368
+ onVisibleHook?: (((name: import("../../use").TransitionHookName) => void) | ((props: {
369
+ id: string;
370
+ onClose: () => void;
371
+ onCancel: () => void;
372
+ onSelect: (item: ActionSheetItem, index: number) => void;
373
+ rootStyle: import("vue").StyleValue;
374
+ rootClass: string;
375
+ description: string;
376
+ itemList: ActionSheetItem[];
377
+ cancel: string;
378
+ showCancel: boolean;
379
+ visible: boolean;
380
+ overlayClosable: boolean;
381
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
382
+ duration: number;
383
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
384
+ onBeforeEnter: () => void;
385
+ onEnter: () => void;
386
+ onAfterEnter: () => void;
387
+ onEnterCancelled: () => void;
388
+ onBeforeLeave: () => void;
389
+ onLeave: () => void;
390
+ onAfterLeave: () => void;
391
+ onLeaveCancelled: () => void;
392
+ }) => (name: import("../../use").TransitionHookName) => void)) | undefined;
393
+ onBeforeEnter?: ((() => void) | ((props: {
394
+ id: string;
395
+ onClose: () => void;
396
+ onCancel: () => void;
397
+ onSelect: (item: ActionSheetItem, index: number) => void;
398
+ rootStyle: import("vue").StyleValue;
399
+ rootClass: string;
400
+ description: string;
401
+ itemList: ActionSheetItem[];
402
+ cancel: string;
403
+ showCancel: boolean;
404
+ visible: boolean;
405
+ overlayClosable: boolean;
406
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
407
+ duration: number;
408
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
409
+ onBeforeEnter: () => void;
410
+ onEnter: () => void;
411
+ onAfterEnter: () => void;
412
+ onEnterCancelled: () => void;
413
+ onBeforeLeave: () => void;
414
+ onLeave: () => void;
415
+ onAfterLeave: () => void;
416
+ onLeaveCancelled: () => void;
417
+ }) => () => void)) | undefined;
418
+ onEnter?: ((() => void) | ((props: {
419
+ id: string;
420
+ onClose: () => void;
421
+ onCancel: () => void;
422
+ onSelect: (item: ActionSheetItem, index: number) => void;
423
+ rootStyle: import("vue").StyleValue;
424
+ rootClass: string;
425
+ description: string;
426
+ itemList: ActionSheetItem[];
427
+ cancel: string;
428
+ showCancel: boolean;
429
+ visible: boolean;
430
+ overlayClosable: boolean;
431
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
432
+ duration: number;
433
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
434
+ onBeforeEnter: () => void;
435
+ onEnter: () => void;
436
+ onAfterEnter: () => void;
437
+ onEnterCancelled: () => void;
438
+ onBeforeLeave: () => void;
439
+ onLeave: () => void;
440
+ onAfterLeave: () => void;
441
+ onLeaveCancelled: () => void;
442
+ }) => () => void)) | undefined;
443
+ onAfterEnter?: ((() => void) | ((props: {
444
+ id: string;
445
+ onClose: () => void;
446
+ onCancel: () => void;
447
+ onSelect: (item: ActionSheetItem, index: number) => void;
448
+ rootStyle: import("vue").StyleValue;
449
+ rootClass: string;
450
+ description: string;
451
+ itemList: ActionSheetItem[];
452
+ cancel: string;
453
+ showCancel: boolean;
454
+ visible: boolean;
455
+ overlayClosable: boolean;
456
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
457
+ duration: number;
458
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
459
+ onBeforeEnter: () => void;
460
+ onEnter: () => void;
461
+ onAfterEnter: () => void;
462
+ onEnterCancelled: () => void;
463
+ onBeforeLeave: () => void;
464
+ onLeave: () => void;
465
+ onAfterLeave: () => void;
466
+ onLeaveCancelled: () => void;
467
+ }) => () => void)) | undefined;
468
+ onEnterCancelled?: ((() => void) | ((props: {
469
+ id: string;
470
+ onClose: () => void;
471
+ onCancel: () => void;
472
+ onSelect: (item: ActionSheetItem, index: number) => void;
473
+ rootStyle: import("vue").StyleValue;
474
+ rootClass: string;
475
+ description: string;
476
+ itemList: ActionSheetItem[];
477
+ cancel: string;
478
+ showCancel: boolean;
479
+ visible: boolean;
480
+ overlayClosable: boolean;
481
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
482
+ duration: number;
483
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
484
+ onBeforeEnter: () => void;
485
+ onEnter: () => void;
486
+ onAfterEnter: () => void;
487
+ onEnterCancelled: () => void;
488
+ onBeforeLeave: () => void;
489
+ onLeave: () => void;
490
+ onAfterLeave: () => void;
491
+ onLeaveCancelled: () => void;
492
+ }) => () => void)) | undefined;
493
+ onBeforeLeave?: ((() => void) | ((props: {
494
+ id: string;
495
+ onClose: () => void;
496
+ onCancel: () => void;
497
+ onSelect: (item: ActionSheetItem, index: number) => void;
498
+ rootStyle: import("vue").StyleValue;
499
+ rootClass: string;
500
+ description: string;
501
+ itemList: ActionSheetItem[];
502
+ cancel: string;
503
+ showCancel: boolean;
504
+ visible: boolean;
505
+ overlayClosable: boolean;
506
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
507
+ duration: number;
508
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
509
+ onBeforeEnter: () => void;
510
+ onEnter: () => void;
511
+ onAfterEnter: () => void;
512
+ onEnterCancelled: () => void;
513
+ onBeforeLeave: () => void;
514
+ onLeave: () => void;
515
+ onAfterLeave: () => void;
516
+ onLeaveCancelled: () => void;
517
+ }) => () => void)) | undefined;
518
+ onLeave?: ((() => void) | ((props: {
519
+ id: string;
520
+ onClose: () => void;
521
+ onCancel: () => void;
522
+ onSelect: (item: ActionSheetItem, index: number) => void;
523
+ rootStyle: import("vue").StyleValue;
524
+ rootClass: string;
525
+ description: string;
526
+ itemList: ActionSheetItem[];
527
+ cancel: string;
528
+ showCancel: boolean;
529
+ visible: boolean;
530
+ overlayClosable: boolean;
531
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
532
+ duration: number;
533
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
534
+ onBeforeEnter: () => void;
535
+ onEnter: () => void;
536
+ onAfterEnter: () => void;
537
+ onEnterCancelled: () => void;
538
+ onBeforeLeave: () => void;
539
+ onLeave: () => void;
540
+ onAfterLeave: () => void;
541
+ onLeaveCancelled: () => void;
542
+ }) => () => void)) | undefined;
543
+ onAfterLeave?: ((() => void) | ((props: {
544
+ id: string;
545
+ onClose: () => void;
546
+ onCancel: () => void;
547
+ onSelect: (item: ActionSheetItem, index: number) => void;
548
+ rootStyle: import("vue").StyleValue;
549
+ rootClass: string;
550
+ description: string;
551
+ itemList: ActionSheetItem[];
552
+ cancel: string;
553
+ showCancel: boolean;
554
+ visible: boolean;
555
+ overlayClosable: boolean;
556
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
557
+ duration: number;
558
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
559
+ onBeforeEnter: () => void;
560
+ onEnter: () => void;
561
+ onAfterEnter: () => void;
562
+ onEnterCancelled: () => void;
563
+ onBeforeLeave: () => void;
564
+ onLeave: () => void;
565
+ onAfterLeave: () => void;
566
+ onLeaveCancelled: () => void;
567
+ }) => () => void)) | undefined;
568
+ onLeaveCancelled?: ((() => void) | ((props: {
569
+ id: string;
570
+ onClose: () => void;
571
+ onCancel: () => void;
572
+ onSelect: (item: ActionSheetItem, index: number) => void;
573
+ rootStyle: import("vue").StyleValue;
574
+ rootClass: string;
575
+ description: string;
576
+ itemList: ActionSheetItem[];
577
+ cancel: string;
578
+ showCancel: boolean;
579
+ visible: boolean;
580
+ overlayClosable: boolean;
581
+ beforeClose: import("../action-sheet/common").ActionSheetBeforeClose;
582
+ duration: number;
583
+ onVisibleHook: (name: import("../../use").TransitionHookName) => void;
584
+ onBeforeEnter: () => void;
585
+ onEnter: () => void;
586
+ onAfterEnter: () => void;
587
+ onEnterCancelled: () => void;
588
+ onBeforeLeave: () => void;
589
+ onLeave: () => void;
590
+ onAfterLeave: () => void;
591
+ onLeaveCancelled: () => void;
592
+ }) => () => void)) | undefined;
593
+ };
594
+ export interface ActionSheetAgentEmits extends ActionSheetEmits {
595
+ }
596
+ export declare const imperativeName = "actionSheet";
597
+ export interface ActionSheetImperative {
598
+ show(newProps: Record<string, any>): void;
599
+ hide(): void;
600
+ }
601
+ export type ActionSheetOptions = ActionSheetAgentProps;
602
+ export interface ActionSheetSimpleShowFunction {
603
+ (options: ActionSheetOptions): void;
604
+ }
605
+ export interface ActionSheetShowFunction {
606
+ (options?: ActionSheetOptions): void;
607
+ }
608
+ export type ActionSheetFunction = ActionSheetSimpleShowFunction & {
609
+ hide: (id?: string) => void;
610
+ hideAll: () => void;
611
+ };
612
+ declare const actionSheet: ActionSheetFunction;
613
+ export { actionSheet };
@@ -0,0 +1,35 @@
1
+ import { defaultActionSheetProps, } from '../action-sheet/common';
2
+ import { defaultConfig } from '../config';
3
+ import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use';
4
+ export const defaultActionSheetAgentProps = () => ({
5
+ ...defaultActionSheetProps,
6
+ ...defaultConfig.actionSheetAgent,
7
+ });
8
+ export const imperativeName = 'actionSheet';
9
+ const show = (options = {}) => {
10
+ const { id = defaultConfig.actionSheetAgent.id } = options;
11
+ const imperative = getAvailableImperative(imperativeName, id);
12
+ if (imperative) {
13
+ imperative.show(options);
14
+ }
15
+ };
16
+ const actionSheet = (options) => {
17
+ show(options);
18
+ };
19
+ const hide = (id = defaultConfig.actionSheetAgent.id) => {
20
+ const imperatives = getImperatives(imperativeName, id);
21
+ if (imperatives && imperatives.length > 0) {
22
+ imperatives.forEach((item) => {
23
+ item.imperative.hide();
24
+ });
25
+ }
26
+ };
27
+ const hideAll = () => {
28
+ const mapImperatives = getAllImperatives()[imperativeName];
29
+ if (mapImperatives) {
30
+ Object.keys(mapImperatives).forEach(hide);
31
+ }
32
+ };
33
+ actionSheet.hide = hide;
34
+ actionSheet.hideAll = hideAll;
35
+ export { actionSheet };
@@ -0,0 +1 @@
1
+ export { type ActionSheetAgentProps, type ActionSheetOptions, type ActionSheetAgentEmits, actionSheet, } from './common';
@@ -0,0 +1 @@
1
+ export { actionSheet, } from './common';
@@ -1,4 +1,5 @@
1
1
  import { type ActionSheetProps } from '../action-sheet';
2
+ import { type ActionSheetAgentProps } from '../action-sheet-agent';
2
3
  import { type AlertProps } from '../alert';
3
4
  import { type AvatarGroupProps } from '../avatar-group';
4
5
  import { type AvatarProps } from '../avatar';
@@ -100,6 +101,7 @@ export interface ConfigOptions {
100
101
  initialZIndex?: number;
101
102
  valueOnClear?: () => any;
102
103
  actionSheet?: InferDefaults<LooseRequired<ActionSheetProps>>;
104
+ actionSheetAgent?: InferDefaults<LooseRequired<ActionSheetAgentProps>>;
103
105
  alert?: InferDefaults<LooseRequired<AlertProps>>;
104
106
  avatar?: InferDefaults<LooseRequired<AvatarProps>>;
105
107
  avatarGroup?: InferDefaults<LooseRequired<AvatarGroupProps>>;
@@ -23,6 +23,9 @@ export const defaultConfig = {
23
23
  overlayClosable: true,
24
24
  duration: 250,
25
25
  },
26
+ actionSheetAgent: {
27
+ id: 'actionSheet',
28
+ },
26
29
  alert: {
27
30
  type: 'primary',
28
31
  },
@@ -277,6 +280,7 @@ export const defaultConfig = {
277
280
  overlay: true,
278
281
  overlayClosable: true,
279
282
  duration: 250,
283
+ backPress: 'close',
280
284
  },
281
285
  popoutInput: {
282
286
  arrow: 'caret-right',
@@ -297,6 +301,7 @@ export const defaultConfig = {
297
301
  overlay: true,
298
302
  overlayClosable: true,
299
303
  lockScroll: true,
304
+ backPress: 'close',
300
305
  },
301
306
  progressBar: {
302
307
  percent: 0,