@destyler/dialog 0.0.3 → 0.0.5

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.
@@ -1,512 +1,11 @@
1
- import { defineComponent, ref, toRefs, h, mergeProps, onMounted, withDirectives } from 'vue';
2
- import { DestylerPrimitive } from '@destyler/primitive';
3
- import { createContext, getOpenState } from '@destyler/shared';
4
- import { useVModel, useId, useForwardExpose, useEmitAsProps, useHideOthers } from '@destyler/composition';
5
- import { DestylerPresence } from '@destyler/presence';
6
- import { DestylerFocusScope } from '@destyler/focus-scope';
7
- import { DestylerDismissableLayer } from '@destyler/dismissable-layer';
8
- import { BindOnceDirective } from '@destyler/directives';
9
- import { DestylerTeleport } from '@destyler/teleport';
10
-
11
- const destylerDialogRootProps = {
12
- open: {
13
- type: Boolean,
14
- required: false,
15
- default: void 0
16
- },
17
- defaultOpen: {
18
- type: Boolean,
19
- required: false,
20
- default: false
21
- },
22
- modal: {
23
- type: Boolean,
24
- required: false,
25
- default: true
26
- }
27
- };
28
- const [injectDialogRootContext, provideDialogRootContext] = createContext("DestylerDialogRoot");
29
- const DestylerDialogRoot = defineComponent({
30
- name: "DestylerDialogRoot",
31
- props: destylerDialogRootProps,
32
- emits: ["update:open"],
33
- setup(props, { emit }) {
34
- const open = useVModel(props, "open", emit, {
35
- defaultValue: props.defaultOpen,
36
- passive: props.open === void 0
37
- });
38
- const triggerElement = ref();
39
- const contentElement = ref();
40
- const { modal } = toRefs(props);
41
- provideDialogRootContext({
42
- open,
43
- modal,
44
- openModal: () => {
45
- open.value = true;
46
- },
47
- onOpenChange: (value) => {
48
- open.value = value;
49
- },
50
- onOpenToggle: () => {
51
- open.value = !open.value;
52
- },
53
- contentId: useId(),
54
- titleId: useId(),
55
- descriptionId: useId(),
56
- triggerElement,
57
- contentElement
58
- });
59
- },
60
- render() {
61
- return this.$slots.default?.();
62
- }
63
- });
64
-
65
- const destylerDialogCloseProps = {
66
- asChild: {
67
- type: Boolean,
68
- required: false,
69
- default: false
70
- },
71
- as: {
72
- type: [String, Object],
73
- required: false,
74
- default: "button"
75
- }
76
- };
77
- const DestylerDialogClose = defineComponent({
78
- name: "DestylerDialogClose",
79
- props: destylerDialogCloseProps,
80
- setup() {
81
- const rootContext = injectDialogRootContext();
82
- return {
83
- rootContext
84
- };
85
- },
86
- render() {
87
- return h(DestylerPrimitive, mergeProps(this.$props, {
88
- type: this.$props.as === "button" ? "button" : void 0,
89
- onClick: () => {
90
- this.rootContext.onOpenChange(false);
91
- }
92
- }), () => this.$slots.default?.());
93
- }
94
- });
95
-
96
- const destylerDialogContentImplProps = {
97
- as: {
98
- type: [String, Object],
99
- required: false,
100
- default: "div"
101
- },
102
- asChild: {
103
- type: Boolean,
104
- required: false,
105
- default: false
106
- },
107
- forceMount: {
108
- type: Boolean,
109
- required: false
110
- },
111
- trapFocus: {
112
- type: Boolean,
113
- required: false,
114
- default: false
115
- }
116
- };
117
- const DestylerDialogContentImpl = defineComponent({
118
- name: "DestylerDialogContentImpl",
119
- props: destylerDialogContentImplProps,
120
- emits: ["openAutoFocus", "closeAutoFocus", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "dismiss"],
121
- setup() {
122
- const rootContext = injectDialogRootContext();
123
- const { forwardRef, currentElement: contentElement } = useForwardExpose();
124
- onMounted(() => {
125
- rootContext.contentElement = contentElement;
126
- });
127
- return {
128
- rootContext,
129
- forwardRef
130
- };
131
- },
132
- render() {
133
- return h(DestylerFocusScope, {
134
- asChild: true,
135
- loop: true,
136
- trapped: this.$props.trapFocus,
137
- onMountAutoFocus: (event) => {
138
- this.$emit("openAutoFocus", event);
139
- },
140
- onUnmountAutoFocus: (event) => {
141
- this.$emit("closeAutoFocus", event);
142
- }
143
- }, () => withDirectives(h(DestylerDismissableLayer, mergeProps(this.$attrs, {
144
- "ref": (el) => this.forwardRef(el),
145
- "as": this.$props.as,
146
- "asChild": this.$props.asChild,
147
- "role": "dialog",
148
- "aria-describedby": this.rootContext.descriptionId,
149
- "aria-labelledby": this.rootContext.titleId,
150
- "data-state": getOpenState(this.rootContext.open.value),
151
- "isDismissable": true,
152
- "onDismiss": () => {
153
- this.rootContext.onOpenChange(false);
154
- },
155
- "onEscapeKeyDown": (event) => {
156
- this.$emit("escapeKeyDown", event);
157
- },
158
- "onFocusOutside": (event) => {
159
- this.$emit("focusOutside", event);
160
- },
161
- "onInteractOutside": (event) => {
162
- this.$emit("interactOutside", event);
163
- },
164
- "onPointerDownOutside": (event) => {
165
- this.$emit("pointerDownOutside", event);
166
- }
167
- }), () => this.$slots.default?.()), [
168
- [BindOnceDirective, { id: this.rootContext.contentId }]
169
- ]));
170
- }
171
- });
172
-
173
- const DestylerDialogContentModal = defineComponent({
174
- name: "DestylerDialogContentModal",
175
- props: destylerDialogContentImplProps,
176
- emits: ["openAutoFocus", "closeAutoFocus", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "dismiss"],
177
- setup(_, { emit }) {
178
- const rootContext = injectDialogRootContext();
179
- const emitsAsProps = useEmitAsProps(emit);
180
- const { forwardRef, currentElement } = useForwardExpose();
181
- useHideOthers(currentElement);
182
- return {
183
- rootContext,
184
- emitsAsProps,
185
- forwardRef
186
- };
187
- },
188
- render() {
189
- return h(DestylerDialogContentImpl, mergeProps(this.$props, this.emitsAsProps, {
190
- "ref": (el) => this.forwardRef(el),
191
- "trap-focus": this.rootContext.open.value,
192
- "disableOutsidePointerEvents": true,
193
- "onCloseAutoFocus": (event) => {
194
- this.$emit("closeAutoFocus", event);
195
- if (!event.defaultPrevented) {
196
- event.preventDefault();
197
- this.rootContext.triggerElement.value?.focus();
198
- }
199
- },
200
- "onPointerDownOutside": (event) => {
201
- const originalEvent = event.detail.originalEvent;
202
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
203
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
204
- if (isRightClick)
205
- event.preventDefault();
206
- },
207
- "onFocusOutside": (event) => {
208
- event.preventDefault();
209
- },
210
- "onOpenAutoFocus": (event) => {
211
- this.$emit("openAutoFocus", event);
212
- }
213
- }), () => this.$slots.default?.());
214
- }
215
- });
216
-
217
- const DestylerDialogContentNonModal = defineComponent({
218
- name: "DestylerDialogContentNonModal",
219
- props: destylerDialogContentImplProps,
220
- emits: ["openAutoFocus", "closeAutoFocus", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "dismiss"],
221
- setup(_, { emit }) {
222
- const rootContext = injectDialogRootContext();
223
- const hasInteractedOutsideRef = ref(false);
224
- const hasPointerDownOutsideRef = ref(false);
225
- const emitsAsProps = useEmitAsProps(emit);
226
- return {
227
- rootContext,
228
- hasInteractedOutsideRef,
229
- hasPointerDownOutsideRef,
230
- emitsAsProps
231
- };
232
- },
233
- render() {
234
- return h(DestylerDialogContentImpl, mergeProps(this.$props, this.emitsAsProps, {
235
- "trap-focus": false,
236
- "disableOutsidePointerEvents": false,
237
- "onCloseAutoFocus": (event) => {
238
- this.$emit("closeAutoFocus", event);
239
- if (!event.defaultPrevented) {
240
- if (!this.hasInteractedOutsideRef)
241
- this.rootContext.triggerElement.value?.focus();
242
- event.preventDefault();
243
- }
244
- this.hasInteractedOutsideRef = false;
245
- this.hasPointerDownOutsideRef = false;
246
- },
247
- "onInteractOutside": (event) => {
248
- if (!event.defaultPrevented) {
249
- this.hasInteractedOutsideRef = true;
250
- if (event.detail.originalEvent.type === "pointerdown")
251
- this.hasPointerDownOutsideRef = true;
252
- }
253
- const target = event.target;
254
- const targetIsTrigger = this.rootContext.triggerElement.value?.contains(target);
255
- if (targetIsTrigger)
256
- event.preventDefault();
257
- if (event.detail.originalEvent.type === "focusin" && this.hasPointerDownOutsideRef)
258
- event.preventDefault();
259
- }
260
- }), () => this.$slots.default?.());
261
- }
262
- });
263
-
264
- const destylerDialogContentProps = {
265
- as: {
266
- type: [String, Object],
267
- required: false,
268
- default: "div"
269
- },
270
- asChild: {
271
- type: Boolean,
272
- required: false,
273
- default: false
274
- },
275
- forceMount: {
276
- type: Boolean,
277
- required: false
278
- },
279
- trapFocus: {
280
- type: Boolean,
281
- required: false,
282
- default: false
283
- }
284
- };
285
- const DestylerDialogContent = defineComponent({
286
- name: "DestylerDialogContent",
287
- props: destylerDialogContentProps,
288
- emits: ["openAutoFocus", "closeAutoFocus", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "dismiss"],
289
- setup(_, { emit }) {
290
- const rootContext = injectDialogRootContext();
291
- const emitsAsProps = useEmitAsProps(emit);
292
- const { forwardRef } = useForwardExpose();
293
- return {
294
- rootContext,
295
- emitsAsProps,
296
- forwardRef
297
- };
298
- },
299
- render() {
300
- const useVShow = this.rootContext.modal.value;
301
- return h(DestylerPresence, {
302
- present: this.$props.forceMount || this.rootContext.open.value
303
- }, () => [
304
- useVShow ? h(DestylerDialogContentModal, mergeProps(this.$props, this.emitsAsProps, this.$attrs, {
305
- ref: (el) => this.forwardRef(el),
306
- onOpenAutoFocus: (event) => {
307
- this.$emit("openAutoFocus", event);
308
- }
309
- }), () => this.$slots.default?.()) : h(DestylerDialogContentNonModal, mergeProps(this.$props, this.emitsAsProps, this.$attrs, { ref: (el) => this.forwardRef(el) }), () => this.$slots.default?.())
310
- ]);
311
- }
312
- });
313
-
314
- const destylerDialogDescriptionProps = {
315
- asChild: {
316
- type: Boolean,
317
- required: false,
318
- default: false
319
- },
320
- as: {
321
- type: [String, Object],
322
- required: false,
323
- default: "p"
324
- }
325
- };
326
- const DestylerDialogDescription = defineComponent({
327
- name: "DestylerDialogDescription",
328
- props: destylerDialogDescriptionProps,
329
- setup() {
330
- const rootContext = injectDialogRootContext();
331
- return {
332
- rootContext
333
- };
334
- },
335
- render() {
336
- return withDirectives(h(DestylerPrimitive, {
337
- as: this.$props.as,
338
- asChild: this.$props.asChild
339
- }, () => this.$slots.default?.()), [
340
- [BindOnceDirective, { id: this.rootContext.descriptionId }]
341
- ]);
342
- }
343
- });
344
-
345
- const destylerDialogOverlayImplProps = {
346
- as: {
347
- type: [String, Object],
348
- required: false,
349
- default: "div"
350
- },
351
- asChild: {
352
- type: Boolean,
353
- required: false,
354
- default: false
355
- }
356
- };
357
- const DestylerDialogOverlayImpl = defineComponent({
358
- name: "DestylerDialogOverlayImpl",
359
- props: destylerDialogOverlayImplProps,
360
- setup() {
361
- const rootContext = injectDialogRootContext();
362
- useForwardExpose();
363
- return {
364
- rootContext
365
- };
366
- },
367
- render() {
368
- return h(DestylerPrimitive, {
369
- "as": this.$props.as,
370
- "asChild": this.$props.asChild,
371
- "data-state": this.rootContext.open.value ? "open" : "closed",
372
- "style": {
373
- "pointer-events": "auto"
374
- }
375
- }, () => this.$slots.default?.());
376
- }
377
- });
378
-
379
- const destylerDialogOverlayProps = {
380
- as: {
381
- type: [String, Object],
382
- required: false,
383
- default: "div"
384
- },
385
- asChild: {
386
- type: Boolean,
387
- required: false,
388
- default: false
389
- },
390
- forceMount: {
391
- type: Boolean,
392
- required: false
393
- }
394
- };
395
- const DestylerDialogOverlay = defineComponent({
396
- name: "DestylerDialogOverlay",
397
- props: destylerDialogOverlayProps,
398
- setup() {
399
- const rootContext = injectDialogRootContext();
400
- const { forwardRef } = useForwardExpose();
401
- return {
402
- rootContext,
403
- forwardRef
404
- };
405
- },
406
- render() {
407
- const useVShow = this.rootContext?.modal.value;
408
- return useVShow ? h(DestylerPresence, {
409
- present: this.$props.forceMount || this.rootContext.open.value
410
- }, () => h(DestylerDialogOverlayImpl, mergeProps(this.$attrs, {
411
- ref: (el) => this.forwardRef(el),
412
- as: this.$props.as,
413
- asChild: this.$props.asChild
414
- }), () => this.$slots.default?.())) : null;
415
- }
416
- });
417
-
418
- const destylerDialogPortalProps = {
419
- as: {
420
- type: [String, Object],
421
- required: false,
422
- default: "div"
423
- },
424
- asChild: {
425
- type: Boolean,
426
- required: false,
427
- default: false
428
- }
429
- };
430
- const DestylerDialogPortal = defineComponent({
431
- name: "DestylerDialogPortal",
432
- props: destylerDialogPortalProps,
433
- render() {
434
- return h(DestylerTeleport, {}, () => this.$slots.default?.());
435
- }
436
- });
437
-
438
- const destylerDialogTitleProps = {
439
- asChild: {
440
- type: Boolean,
441
- required: false,
442
- default: false
443
- },
444
- as: {
445
- type: [String, Object],
446
- required: false,
447
- default: "h2"
448
- }
449
- };
450
- const DestylerDialogTitle = defineComponent({
451
- name: "DestylerDialogTitle",
452
- props: destylerDialogTitleProps,
453
- setup() {
454
- const rootContext = injectDialogRootContext();
455
- return {
456
- rootContext
457
- };
458
- },
459
- render() {
460
- return withDirectives(h(DestylerPrimitive, {
461
- as: this.$props.as,
462
- asChild: this.$props.asChild
463
- }, () => this.$slots.default?.()), [
464
- [BindOnceDirective, { id: this.rootContext.titleId }]
465
- ]);
466
- }
467
- });
468
-
469
- const destylerDialogTriggerProps = {
470
- asChild: {
471
- type: Boolean,
472
- required: false,
473
- default: false
474
- },
475
- as: {
476
- type: [String, Object],
477
- required: false,
478
- default: "button"
479
- }
480
- };
481
- const DestylerDialogTrigger = defineComponent({
482
- name: "DestylerDialogTrigger",
483
- props: destylerDialogTriggerProps,
484
- setup() {
485
- const rootContext = injectDialogRootContext();
486
- const { forwardRef, currentElement } = useForwardExpose();
487
- onMounted(() => {
488
- rootContext.triggerElement = currentElement;
489
- });
490
- return {
491
- rootContext,
492
- forwardRef
493
- };
494
- },
495
- render() {
496
- return h(DestylerPrimitive, mergeProps(this.$attrs, {
497
- "as": this.$props.as,
498
- "asChild": this.$props.asChild,
499
- "ref": (el) => this.forwardRef(el),
500
- "type": this.$props.as === "button" ? "button" : void 0,
501
- "aria-haspopup": "dialog",
502
- "aria-expanded": this.rootContext.open.value || false,
503
- "aria-controls": this.rootContext.contentId,
504
- "data-state": this.rootContext.open.value ? "open" : "closed",
505
- "onClick": () => {
506
- this.rootContext.onOpenToggle();
507
- }
508
- }), () => this.$slots.default?.());
509
- }
510
- });
511
-
512
- export { DestylerDialogClose, DestylerDialogContent, DestylerDialogContentImpl, DestylerDialogContentModal, DestylerDialogContentNonModal, DestylerDialogDescription, DestylerDialogOverlay, DestylerDialogOverlayImpl, DestylerDialogPortal, DestylerDialogRoot, DestylerDialogTitle, DestylerDialogTrigger };
1
+ export { D as DialogClose, a as DialogContent, q as DialogContentImpl, t as DialogContentModal, u as DialogContentNonModal, c as DialogDescription, f as DialogOverlay, v as DialogOverlayImpl, h as DialogPortal, j as DialogRoot, l as DialogTitle, n as DialogTrigger, d as dialogCloseProps, p as dialogContentEmits, r as dialogContentImplEmtis, s as dialogContentImplProps, b as dialogContentProps, e as dialogDescriptionProps, w as dialogOverlayImplProps, i as dialogPortalProps, x as dialogRootEmits, k as dialogRootProps, m as dialogTitleProps, o as dialogTriggerProps } from './shared/dialog.1e7a01aa.mjs';
2
+ import 'vue';
3
+ import '@destyler/primitive';
4
+ import '@destyler/composition';
5
+ import '@destyler/shared';
6
+ import '@destyler/presence';
7
+ import '@destyler/focus-scope';
8
+ import '@destyler/dismissable-layer';
9
+ import '@destyler/dismissable-layer/component';
10
+ import '@destyler/directives';
11
+ import '@destyler/teleport';
package/dist/index.cjs CHANGED
@@ -1,23 +1,32 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./component.cjs');
3
+ const index = require('./shared/dialog.d09a7a95.cjs');
4
4
  require('vue');
5
5
  require('@destyler/primitive');
6
- require('@destyler/shared');
7
6
  require('@destyler/composition');
7
+ require('@destyler/shared');
8
8
  require('@destyler/presence');
9
9
  require('@destyler/focus-scope');
10
10
  require('@destyler/dismissable-layer');
11
+ require('@destyler/dismissable-layer/component');
11
12
  require('@destyler/directives');
12
13
  require('@destyler/teleport');
13
14
 
14
15
 
15
16
 
16
- exports.DestylerDialogClose = index.DestylerDialogClose;
17
- exports.DestylerDialogContent = index.DestylerDialogContent;
18
- exports.DestylerDialogDescription = index.DestylerDialogDescription;
19
- exports.DestylerDialogOverlay = index.DestylerDialogOverlay;
20
- exports.DestylerDialogPortal = index.DestylerDialogPortal;
21
- exports.DestylerDialogRoot = index.DestylerDialogRoot;
22
- exports.DestylerDialogTitle = index.DestylerDialogTitle;
23
- exports.DestylerDialogTrigger = index.DestylerDialogTrigger;
17
+ exports.DialogClose = index.DialogClose;
18
+ exports.DialogContent = index.DialogContent;
19
+ exports.DialogDescription = index.DialogDescription;
20
+ exports.DialogOverlay = index.DialogOverlay;
21
+ exports.DialogPortal = index.DialogPortal;
22
+ exports.DialogRoot = index.DialogRoot;
23
+ exports.DialogTitle = index.DialogTitle;
24
+ exports.DialogTrigger = index.DialogTrigger;
25
+ exports.dialogCloseProps = index.dialogCloseProps;
26
+ exports.dialogContentProps = index.dialogContentProps;
27
+ exports.dialogDescriptionProps = index.dialogDescriptionProps;
28
+ exports.dialogOverlayProps = index.dialogOverlayProps;
29
+ exports.dialogPortalProps = index.dialogPortalProps;
30
+ exports.dialogRootProps = index.dialogRootProps;
31
+ exports.dialogTitleProps = index.dialogTitleProps;
32
+ exports.dialogTriggerProps = index.dialogTriggerProps;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as DestylerDialogClose, b as DestylerDialogCloseProps, c as DestylerDialogContent, d as DestylerDialogContentProps, e as DestylerDialogDescription, f as DestylerDialogDescriptionProps, g as DestylerDialogOverlay, p as DestylerDialogOverlayProps, h as DestylerDialogPortal, i as DestylerDialogPortalProps, j as DestylerDialogRoot, k as DestylerDialogRootProps, l as DestylerDialogTitle, m as DestylerDialogTitleProps, n as DestylerDialogTrigger, o as DestylerDialogTriggerProps } from './shared/dialog.25aba8c4.cjs';
1
+ export { a as DialogClose, b as DialogCloseProps, c as DialogContent, g as DialogContentProps, h as DialogDescription, j as DialogDescriptionProps, k as DialogOverlay, z as DialogOverlayProps, l as DialogPortal, n as DialogPortalProps, o as DialogRoot, r as DialogRootProps, s as DialogTitle, u as DialogTitleProps, v as DialogTrigger, x as DialogTriggerProps, d as dialogCloseProps, e as dialogContentProps, i as dialogDescriptionProps, y as dialogOverlayProps, m as dialogPortalProps, p as dialogRootProps, t as dialogTitleProps, w as dialogTriggerProps } from './shared/dialog.f396ab6e.cjs';
2
2
  import 'vue';
3
3
  import '@destyler/shared';
4
4
  import '@destyler/primitive';
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as DestylerDialogClose, b as DestylerDialogCloseProps, c as DestylerDialogContent, d as DestylerDialogContentProps, e as DestylerDialogDescription, f as DestylerDialogDescriptionProps, g as DestylerDialogOverlay, p as DestylerDialogOverlayProps, h as DestylerDialogPortal, i as DestylerDialogPortalProps, j as DestylerDialogRoot, k as DestylerDialogRootProps, l as DestylerDialogTitle, m as DestylerDialogTitleProps, n as DestylerDialogTrigger, o as DestylerDialogTriggerProps } from './shared/dialog.25aba8c4.mjs';
1
+ export { a as DialogClose, b as DialogCloseProps, c as DialogContent, g as DialogContentProps, h as DialogDescription, j as DialogDescriptionProps, k as DialogOverlay, z as DialogOverlayProps, l as DialogPortal, n as DialogPortalProps, o as DialogRoot, r as DialogRootProps, s as DialogTitle, u as DialogTitleProps, v as DialogTrigger, x as DialogTriggerProps, d as dialogCloseProps, e as dialogContentProps, i as dialogDescriptionProps, y as dialogOverlayProps, m as dialogPortalProps, p as dialogRootProps, t as dialogTitleProps, w as dialogTriggerProps } from './shared/dialog.f396ab6e.mjs';
2
2
  import 'vue';
3
3
  import '@destyler/shared';
4
4
  import '@destyler/primitive';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as DestylerDialogClose, b as DestylerDialogCloseProps, c as DestylerDialogContent, d as DestylerDialogContentProps, e as DestylerDialogDescription, f as DestylerDialogDescriptionProps, g as DestylerDialogOverlay, p as DestylerDialogOverlayProps, h as DestylerDialogPortal, i as DestylerDialogPortalProps, j as DestylerDialogRoot, k as DestylerDialogRootProps, l as DestylerDialogTitle, m as DestylerDialogTitleProps, n as DestylerDialogTrigger, o as DestylerDialogTriggerProps } from './shared/dialog.25aba8c4.js';
1
+ export { a as DialogClose, b as DialogCloseProps, c as DialogContent, g as DialogContentProps, h as DialogDescription, j as DialogDescriptionProps, k as DialogOverlay, z as DialogOverlayProps, l as DialogPortal, n as DialogPortalProps, o as DialogRoot, r as DialogRootProps, s as DialogTitle, u as DialogTitleProps, v as DialogTrigger, x as DialogTriggerProps, d as dialogCloseProps, e as dialogContentProps, i as dialogDescriptionProps, y as dialogOverlayProps, m as dialogPortalProps, p as dialogRootProps, t as dialogTitleProps, w as dialogTriggerProps } from './shared/dialog.f396ab6e.js';
2
2
  import 'vue';
3
3
  import '@destyler/shared';
4
4
  import '@destyler/primitive';
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
- export { DestylerDialogClose, DestylerDialogContent, DestylerDialogDescription, DestylerDialogOverlay, DestylerDialogPortal, DestylerDialogRoot, DestylerDialogTitle, DestylerDialogTrigger } from './component.mjs';
1
+ export { D as DialogClose, a as DialogContent, c as DialogDescription, f as DialogOverlay, h as DialogPortal, j as DialogRoot, l as DialogTitle, n as DialogTrigger, d as dialogCloseProps, b as dialogContentProps, e as dialogDescriptionProps, g as dialogOverlayProps, i as dialogPortalProps, k as dialogRootProps, m as dialogTitleProps, o as dialogTriggerProps } from './shared/dialog.1e7a01aa.mjs';
2
2
  import 'vue';
3
3
  import '@destyler/primitive';
4
- import '@destyler/shared';
5
4
  import '@destyler/composition';
5
+ import '@destyler/shared';
6
6
  import '@destyler/presence';
7
7
  import '@destyler/focus-scope';
8
8
  import '@destyler/dismissable-layer';
9
+ import '@destyler/dismissable-layer/component';
9
10
  import '@destyler/directives';
10
11
  import '@destyler/teleport';
package/dist/resolver.cjs CHANGED
@@ -4,16 +4,16 @@ const name = "@destyler/dialog";
4
4
 
5
5
  const packageName = name;
6
6
  const dialogComponentName = [
7
- "DestylerDialogClose",
8
- "DestylerDialogContent",
9
- "DestylerDialogDescription",
10
- "DestylerDialogOverlay",
11
- "DestylerDialogPortal",
12
- "DestylerDialogRoot",
13
- "DestylerDialogTitle",
14
- "DestylerDialogTrigger"
7
+ "DialogClose",
8
+ "DialogContent",
9
+ "DialogDescription",
10
+ "DialogOverlay",
11
+ "DialogPortal",
12
+ "DialogRoot",
13
+ "DialogTitle",
14
+ "DialogTrigger"
15
15
  ];
16
- function DestylerDialogResolver() {
16
+ function DialogResolver() {
17
17
  return {
18
18
  type: "component",
19
19
  resolve: (name2) => {
@@ -23,5 +23,5 @@ function DestylerDialogResolver() {
23
23
  };
24
24
  }
25
25
 
26
- exports.DestylerDialogResolver = DestylerDialogResolver;
26
+ exports.DialogResolver = DialogResolver;
27
27
  exports.dialogComponentName = dialogComponentName;
@@ -1,6 +1,6 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
 
3
3
  declare const dialogComponentName: string[];
4
- declare function DestylerDialogResolver(): ComponentResolver;
4
+ declare function DialogResolver(): ComponentResolver;
5
5
 
6
- export { DestylerDialogResolver, dialogComponentName };
6
+ export { DialogResolver, dialogComponentName };
@@ -1,6 +1,6 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
 
3
3
  declare const dialogComponentName: string[];
4
- declare function DestylerDialogResolver(): ComponentResolver;
4
+ declare function DialogResolver(): ComponentResolver;
5
5
 
6
- export { DestylerDialogResolver, dialogComponentName };
6
+ export { DialogResolver, dialogComponentName };
@@ -1,6 +1,6 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
 
3
3
  declare const dialogComponentName: string[];
4
- declare function DestylerDialogResolver(): ComponentResolver;
4
+ declare function DialogResolver(): ComponentResolver;
5
5
 
6
- export { DestylerDialogResolver, dialogComponentName };
6
+ export { DialogResolver, dialogComponentName };