v-calendar-3 1.1.1 → 1.2.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.
- package/README.md +14 -1
- package/dist/cjs/index.js +12 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +13 -4
- package/dist/es/index.js.map +1 -1
- package/dist/iife/index.js +1 -1
- package/dist/iife/index.js.map +1 -1
- package/dist/mjs/index.mjs +13 -4
- package/dist/mjs/index.mjs.map +1 -1
- package/dist/types/components/CalendarGrid/CalendarCellPopover.vue.d.ts +2 -0
- package/dist/types/components/DatePicker/DatePicker.vue.d.ts +12 -0
- package/dist/types/components/DatePicker/TimePicker.vue.d.ts +8 -0
- package/dist/types/components/Popover/Popover.vue.d.ts +2 -0
- package/dist/types/index.d.cts +32 -0
- package/dist/types/index.d.mts +32 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/use/calendarGrid.d.ts +12 -0
- package/dist/types/use/datePicker.d.ts +16 -0
- package/dist/types/use/timePicker.d.ts +8 -0
- package/dist/types/utils/defaults/index.d.ts +1 -0
- package/dist/types/utils/popovers.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Popover/Popover.vue +48 -39
- package/src/use/datePicker.ts +1 -3
- package/src/utils/defaults/index.ts +1 -0
- package/src/utils/popovers.ts +2 -0
- package/web-types.json +5 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A maintained Vue 3 calendar and date picker with TypeScript declarations,
|
|
|
4
4
|
timezone support, keyboard navigation, touch interaction, and responsive theme
|
|
5
5
|
handling.
|
|
6
6
|
|
|
7
|
-
Current version: `1.
|
|
7
|
+
Current version: `1.2.0`
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -187,6 +187,19 @@ visibility.
|
|
|
187
187
|
For a range picker, `inputValue` and `inputEvents` contain separate `start` and
|
|
188
188
|
`end` properties.
|
|
189
189
|
|
|
190
|
+
If an ancestor clips overflow, teleport the popover to the trigger's document
|
|
191
|
+
body. This also works when the date picker is mounted inside an iframe.
|
|
192
|
+
|
|
193
|
+
```vue
|
|
194
|
+
<VDatePicker
|
|
195
|
+
v-model="date"
|
|
196
|
+
:popover="{
|
|
197
|
+
visibility: 'hover-focus',
|
|
198
|
+
teleport: true,
|
|
199
|
+
}"
|
|
200
|
+
/>
|
|
201
|
+
```
|
|
202
|
+
|
|
190
203
|
## Bounds and disabled dates
|
|
191
204
|
|
|
192
205
|
`min-date`, `max-date`, `disabled-dates`, and attribute dates accept native
|
package/dist/cjs/index.js
CHANGED
|
@@ -8480,7 +8480,12 @@ var Popover_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
8480
8480
|
isHovered: false,
|
|
8481
8481
|
isFocused: false,
|
|
8482
8482
|
autoHide: false,
|
|
8483
|
-
force: false
|
|
8483
|
+
force: false,
|
|
8484
|
+
teleport: false
|
|
8485
|
+
});
|
|
8486
|
+
const teleportTarget = (0, vue.computed)(() => {
|
|
8487
|
+
if (!state.teleport) return null;
|
|
8488
|
+
return resolveEl(state.target)?.ownerDocument?.body ?? null;
|
|
8484
8489
|
});
|
|
8485
8490
|
function updateDirection(placement) {
|
|
8486
8491
|
if (placement) state.direction = placement.split("-")[0];
|
|
@@ -8700,6 +8705,7 @@ var Popover_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
8700
8705
|
return {
|
|
8701
8706
|
...(0, vue.toRefs)(state),
|
|
8702
8707
|
popoverRef,
|
|
8708
|
+
teleportTarget,
|
|
8703
8709
|
alignment,
|
|
8704
8710
|
hide,
|
|
8705
8711
|
setupPopper,
|
|
@@ -8725,7 +8731,10 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
8725
8731
|
//#endregion
|
|
8726
8732
|
//#region src/components/Popover/Popover.vue
|
|
8727
8733
|
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8728
|
-
return (0, vue.openBlock)(), (0, vue.
|
|
8734
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(vue.Teleport, {
|
|
8735
|
+
to: _ctx.teleportTarget,
|
|
8736
|
+
disabled: _ctx.teleportTarget == null
|
|
8737
|
+
}, [(0, vue.createElementVNode)("div", {
|
|
8729
8738
|
class: (0, vue.normalizeClass)(["vc-popover-content-wrapper", { "is-interactive": _ctx.isInteractive }]),
|
|
8730
8739
|
ref: "popoverRef",
|
|
8731
8740
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
@@ -8762,7 +8771,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8762
8771
|
"onAfterEnter",
|
|
8763
8772
|
"onBeforeLeave",
|
|
8764
8773
|
"onAfterLeave"
|
|
8765
|
-
])], 34);
|
|
8774
|
+
])], 34)], 8, ["to", "disabled"]);
|
|
8766
8775
|
}
|
|
8767
8776
|
var Popover_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Popover_vue_vue_type_script_lang_default, [["render", _sfc_render$7]]);
|
|
8768
8777
|
//#endregion
|