@progress/kendo-vue-inputs
Version:
76 lines (75 loc) • 1.95 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { defineComponent as i, createVNode as r, isVNode as s } from "vue";
import { Popup as l } from "@progress/kendo-vue-popup";
import { getDefaultSlots as a, classNames as h } from "@progress/kendo-vue-common";
function c(o) {
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !s(o);
}
const u = "bottom", d = "top", f = /* @__PURE__ */ i({
name: "KendoPicker",
props: {
popupSettings: Object,
dir: String,
open: Boolean,
popupAnchor: String,
id: String,
onOpen: Function
},
computed: {
horizontalAlign() {
return this.$props.dir === "rtl" ? "right" : "left";
},
anchorAlign() {
return {
horizontal: this.horizontalAlign,
vertical: u
};
},
popupAlign() {
return {
horizontal: this.horizontalAlign,
vertical: d
};
}
},
render() {
const o = a(this), {
popupClass: t,
appendTo: n,
animate: e,
className: p
} = this.$props.popupSettings;
return r(l, {
id: this.id,
anchor: this.$props.popupAnchor,
anchorAlign: this.anchorAlign,
popupAlign: this.popupAlign,
show: this.$props.open,
onOpen: this.handleOpen,
onClose: this.handleClose,
appendTo: n,
animate: e,
popupClass: t,
class: h("k-reset", p)
}, c(o) ? o : {
default: () => [o]
});
},
methods: {
handleOpen() {
this.$emit("open");
},
handleClose() {
this.$emit("close");
}
}
});
export {
f as Picker
};