@destyler/popover 0.0.1-beta.11 → 0.0.1-beta.13
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/component.cjs +4 -2
- package/dist/component.mjs +5 -3
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{popover.ada869b3.mjs → popover.1439b1d2.mjs} +30 -10
- package/dist/shared/{popover.c7826df2.cjs → popover.5d0578ba.cjs} +30 -10
- package/package.json +10 -10
package/dist/component.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const vue = require('vue');
|
|
4
4
|
const popper = require('@destyler/popper');
|
|
5
|
-
const index = require('./shared/popover.
|
|
5
|
+
const index = require('./shared/popover.5d0578ba.cjs');
|
|
6
6
|
require('@destyler/primitive');
|
|
7
7
|
require('@destyler/shared');
|
|
8
8
|
require('@destyler/composition');
|
|
@@ -40,7 +40,9 @@ const DestylerPopoverAnchor = vue.defineComponent({
|
|
|
40
40
|
});
|
|
41
41
|
},
|
|
42
42
|
render() {
|
|
43
|
-
return vue.h(popper.DestylerPopperAnchor, vue.mergeProps(this.$props, {}),
|
|
43
|
+
return vue.h(popper.DestylerPopperAnchor, vue.mergeProps(this.$props, {}), {
|
|
44
|
+
default: () => this.$slots.default?.()
|
|
45
|
+
});
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
|
package/dist/component.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, onBeforeMount, onUnmounted, h, mergeProps } from 'vue';
|
|
2
2
|
import { DestylerPopperAnchor } from '@destyler/popper';
|
|
3
|
-
import { i as injectPopoverRootContext } from './shared/popover.
|
|
4
|
-
export { D as DestylerPopoverArrow, a as DestylerPopoverClose, b as DestylerPopoverContent, c as DestylerPopoverContentImpl, d as DestylerPopoverContentModal, e as DestylerPopoverContentNonModal, f as DestylerPopoverPortal, g as DestylerPopoverRoot, h as DestylerPopoverTrigger } from './shared/popover.
|
|
3
|
+
import { i as injectPopoverRootContext } from './shared/popover.1439b1d2.mjs';
|
|
4
|
+
export { D as DestylerPopoverArrow, a as DestylerPopoverClose, b as DestylerPopoverContent, c as DestylerPopoverContentImpl, d as DestylerPopoverContentModal, e as DestylerPopoverContentNonModal, f as DestylerPopoverPortal, g as DestylerPopoverRoot, h as DestylerPopoverTrigger } from './shared/popover.1439b1d2.mjs';
|
|
5
5
|
import '@destyler/primitive';
|
|
6
6
|
import '@destyler/shared';
|
|
7
7
|
import '@destyler/composition';
|
|
@@ -39,7 +39,9 @@ const DestylerPopoverAnchor = defineComponent({
|
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
render() {
|
|
42
|
-
return h(DestylerPopperAnchor, mergeProps(this.$props, {}),
|
|
42
|
+
return h(DestylerPopperAnchor, mergeProps(this.$props, {}), {
|
|
43
|
+
default: () => this.$slots.default?.()
|
|
44
|
+
});
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DestylerPopoverArrow, a as DestylerPopoverClose, b as DestylerPopoverContent, f as DestylerPopoverPortal, g as DestylerPopoverRoot, h as DestylerPopoverTrigger } from './shared/popover.
|
|
1
|
+
export { D as DestylerPopoverArrow, a as DestylerPopoverClose, b as DestylerPopoverContent, f as DestylerPopoverPortal, g as DestylerPopoverRoot, h as DestylerPopoverTrigger } from './shared/popover.1439b1d2.mjs';
|
|
2
2
|
import 'vue';
|
|
3
3
|
import '@destyler/popper';
|
|
4
4
|
import '@destyler/primitive';
|
|
@@ -35,7 +35,9 @@ const DestylerPopoverArrow = defineComponent({
|
|
|
35
35
|
name: "DestylerPopoverArrow",
|
|
36
36
|
props: destylerPopoverArrowProps,
|
|
37
37
|
render() {
|
|
38
|
-
return h(DestylerPopperArrow, mergeProps(this.$props, {}),
|
|
38
|
+
return h(DestylerPopperArrow, mergeProps(this.$props, {}), {
|
|
39
|
+
default: () => this.$slots.default?.()
|
|
40
|
+
});
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
43
|
|
|
@@ -93,7 +95,9 @@ const DestylerPopoverRoot = defineComponent({
|
|
|
93
95
|
};
|
|
94
96
|
},
|
|
95
97
|
render() {
|
|
96
|
-
return h(DestylerPopperRoot,
|
|
98
|
+
return h(DestylerPopperRoot, null, {
|
|
99
|
+
default: () => this.$slots.default?.()
|
|
100
|
+
});
|
|
97
101
|
}
|
|
98
102
|
});
|
|
99
103
|
|
|
@@ -126,7 +130,9 @@ const DestylerPopoverClose = defineComponent({
|
|
|
126
130
|
onClick: () => {
|
|
127
131
|
this.rootContext.onOpenChange(false);
|
|
128
132
|
}
|
|
129
|
-
},
|
|
133
|
+
}, {
|
|
134
|
+
default: () => this.$slots.default?.()
|
|
135
|
+
});
|
|
130
136
|
}
|
|
131
137
|
});
|
|
132
138
|
|
|
@@ -269,7 +275,9 @@ const DestylerPopoverContentImpl = defineComponent({
|
|
|
269
275
|
"--destyler_popover_trigger_width": "var(--destyler_popper_anchor_width)",
|
|
270
276
|
"--destyler_popover_trigger_height": "var(--destyler_popper_anchor_height)"
|
|
271
277
|
}
|
|
272
|
-
}),
|
|
278
|
+
}), {
|
|
279
|
+
default: () => this.$slots.default?.()
|
|
280
|
+
}), [
|
|
273
281
|
[BindOnceDirective, { id: this.rootContext.contentId }]
|
|
274
282
|
])));
|
|
275
283
|
}
|
|
@@ -310,7 +318,9 @@ const DestylerPopoverContentModal = defineComponent({
|
|
|
310
318
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
311
319
|
this.isRightClickOutsideRef = isRightClick;
|
|
312
320
|
}
|
|
313
|
-
},
|
|
321
|
+
}, {
|
|
322
|
+
default: () => this.$slots.default?.()
|
|
323
|
+
});
|
|
314
324
|
}
|
|
315
325
|
});
|
|
316
326
|
|
|
@@ -359,7 +369,9 @@ const DestylerPopoverContentNonModal = defineComponent({
|
|
|
359
369
|
if (event.detail.originalEvent.type === "focusin" && this.hasPointerDownOutsideRef)
|
|
360
370
|
event.preventDefault();
|
|
361
371
|
}
|
|
362
|
-
},
|
|
372
|
+
}, {
|
|
373
|
+
default: () => this.$slots.default?.()
|
|
374
|
+
});
|
|
363
375
|
}
|
|
364
376
|
});
|
|
365
377
|
|
|
@@ -390,9 +402,13 @@ const DestylerPopoverContent = defineComponent({
|
|
|
390
402
|
present: this.forceMount || this.rootContext.open.value
|
|
391
403
|
}, useVShow ? h(DestylerPopoverContentModal, {
|
|
392
404
|
...this.forwarded
|
|
393
|
-
},
|
|
405
|
+
}, {
|
|
406
|
+
default: () => this.$slots.default?.()
|
|
407
|
+
}) : h(DestylerPopoverContentNonModal, {
|
|
394
408
|
...this.forwarded
|
|
395
|
-
},
|
|
409
|
+
}, {
|
|
410
|
+
default: () => this.$slots.default?.()
|
|
411
|
+
}));
|
|
396
412
|
}
|
|
397
413
|
});
|
|
398
414
|
|
|
@@ -417,7 +433,9 @@ const DestylerPopoverPortal = defineComponent({
|
|
|
417
433
|
name: "DestylerPopoverPortal",
|
|
418
434
|
props: destylerPopoverPortalProps,
|
|
419
435
|
render() {
|
|
420
|
-
return h(DestylerTeleport, mergeProps(this.$props),
|
|
436
|
+
return h(DestylerTeleport, mergeProps(this.$props), {
|
|
437
|
+
default: () => this.$slots.default?.()
|
|
438
|
+
});
|
|
421
439
|
}
|
|
422
440
|
});
|
|
423
441
|
|
|
@@ -462,7 +480,9 @@ const DestylerPopoverTrigger = defineComponent({
|
|
|
462
480
|
"onClick": () => {
|
|
463
481
|
this.rootContext.onOpenToggle();
|
|
464
482
|
}
|
|
465
|
-
},
|
|
483
|
+
}, {
|
|
484
|
+
default: () => this.$slots.default?.()
|
|
485
|
+
}));
|
|
466
486
|
}
|
|
467
487
|
});
|
|
468
488
|
|
|
@@ -37,7 +37,9 @@ const DestylerPopoverArrow = vue.defineComponent({
|
|
|
37
37
|
name: "DestylerPopoverArrow",
|
|
38
38
|
props: destylerPopoverArrowProps,
|
|
39
39
|
render() {
|
|
40
|
-
return vue.h(popper.DestylerPopperArrow, vue.mergeProps(this.$props, {}),
|
|
40
|
+
return vue.h(popper.DestylerPopperArrow, vue.mergeProps(this.$props, {}), {
|
|
41
|
+
default: () => this.$slots.default?.()
|
|
42
|
+
});
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
|
|
@@ -95,7 +97,9 @@ const DestylerPopoverRoot = vue.defineComponent({
|
|
|
95
97
|
};
|
|
96
98
|
},
|
|
97
99
|
render() {
|
|
98
|
-
return vue.h(popper.DestylerPopperRoot,
|
|
100
|
+
return vue.h(popper.DestylerPopperRoot, null, {
|
|
101
|
+
default: () => this.$slots.default?.()
|
|
102
|
+
});
|
|
99
103
|
}
|
|
100
104
|
});
|
|
101
105
|
|
|
@@ -128,7 +132,9 @@ const DestylerPopoverClose = vue.defineComponent({
|
|
|
128
132
|
onClick: () => {
|
|
129
133
|
this.rootContext.onOpenChange(false);
|
|
130
134
|
}
|
|
131
|
-
},
|
|
135
|
+
}, {
|
|
136
|
+
default: () => this.$slots.default?.()
|
|
137
|
+
});
|
|
132
138
|
}
|
|
133
139
|
});
|
|
134
140
|
|
|
@@ -271,7 +277,9 @@ const DestylerPopoverContentImpl = vue.defineComponent({
|
|
|
271
277
|
"--destyler_popover_trigger_width": "var(--destyler_popper_anchor_width)",
|
|
272
278
|
"--destyler_popover_trigger_height": "var(--destyler_popper_anchor_height)"
|
|
273
279
|
}
|
|
274
|
-
}),
|
|
280
|
+
}), {
|
|
281
|
+
default: () => this.$slots.default?.()
|
|
282
|
+
}), [
|
|
275
283
|
[directives.BindOnceDirective, { id: this.rootContext.contentId }]
|
|
276
284
|
])));
|
|
277
285
|
}
|
|
@@ -312,7 +320,9 @@ const DestylerPopoverContentModal = vue.defineComponent({
|
|
|
312
320
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
313
321
|
this.isRightClickOutsideRef = isRightClick;
|
|
314
322
|
}
|
|
315
|
-
},
|
|
323
|
+
}, {
|
|
324
|
+
default: () => this.$slots.default?.()
|
|
325
|
+
});
|
|
316
326
|
}
|
|
317
327
|
});
|
|
318
328
|
|
|
@@ -361,7 +371,9 @@ const DestylerPopoverContentNonModal = vue.defineComponent({
|
|
|
361
371
|
if (event.detail.originalEvent.type === "focusin" && this.hasPointerDownOutsideRef)
|
|
362
372
|
event.preventDefault();
|
|
363
373
|
}
|
|
364
|
-
},
|
|
374
|
+
}, {
|
|
375
|
+
default: () => this.$slots.default?.()
|
|
376
|
+
});
|
|
365
377
|
}
|
|
366
378
|
});
|
|
367
379
|
|
|
@@ -392,9 +404,13 @@ const DestylerPopoverContent = vue.defineComponent({
|
|
|
392
404
|
present: this.forceMount || this.rootContext.open.value
|
|
393
405
|
}, useVShow ? vue.h(DestylerPopoverContentModal, {
|
|
394
406
|
...this.forwarded
|
|
395
|
-
},
|
|
407
|
+
}, {
|
|
408
|
+
default: () => this.$slots.default?.()
|
|
409
|
+
}) : vue.h(DestylerPopoverContentNonModal, {
|
|
396
410
|
...this.forwarded
|
|
397
|
-
},
|
|
411
|
+
}, {
|
|
412
|
+
default: () => this.$slots.default?.()
|
|
413
|
+
}));
|
|
398
414
|
}
|
|
399
415
|
});
|
|
400
416
|
|
|
@@ -419,7 +435,9 @@ const DestylerPopoverPortal = vue.defineComponent({
|
|
|
419
435
|
name: "DestylerPopoverPortal",
|
|
420
436
|
props: destylerPopoverPortalProps,
|
|
421
437
|
render() {
|
|
422
|
-
return vue.h(teleport.DestylerTeleport, vue.mergeProps(this.$props),
|
|
438
|
+
return vue.h(teleport.DestylerTeleport, vue.mergeProps(this.$props), {
|
|
439
|
+
default: () => this.$slots.default?.()
|
|
440
|
+
});
|
|
423
441
|
}
|
|
424
442
|
});
|
|
425
443
|
|
|
@@ -464,7 +482,9 @@ const DestylerPopoverTrigger = vue.defineComponent({
|
|
|
464
482
|
"onClick": () => {
|
|
465
483
|
this.rootContext.onOpenToggle();
|
|
466
484
|
}
|
|
467
|
-
},
|
|
485
|
+
}, {
|
|
486
|
+
default: () => this.$slots.default?.()
|
|
487
|
+
}));
|
|
468
488
|
}
|
|
469
489
|
});
|
|
470
490
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/popover",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.13",
|
|
4
4
|
"description": "unstyled popover component for vue",
|
|
5
5
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"vue": ">=3.3.4"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@destyler/
|
|
37
|
-
"@destyler/
|
|
38
|
-
"@destyler/
|
|
39
|
-
"@destyler/
|
|
40
|
-
"@destyler/
|
|
41
|
-
"@destyler/primitive": "0.0.1-beta.
|
|
42
|
-
"@destyler/
|
|
43
|
-
"@destyler/
|
|
44
|
-
"@destyler/
|
|
36
|
+
"@destyler/composition": "0.0.1-beta.13",
|
|
37
|
+
"@destyler/directives": "0.0.1-beta.13",
|
|
38
|
+
"@destyler/dismissable-layer": "0.0.1-beta.13",
|
|
39
|
+
"@destyler/focus-scope": "0.0.1-beta.13",
|
|
40
|
+
"@destyler/shared": "0.0.1-beta.13",
|
|
41
|
+
"@destyler/primitive": "0.0.1-beta.13",
|
|
42
|
+
"@destyler/teleport": "0.0.1-beta.13",
|
|
43
|
+
"@destyler/popper": "0.0.1-beta.13",
|
|
44
|
+
"@destyler/presence": "0.0.1-beta.13"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"clear": "rimraf ./dist",
|