@progress/kendo-vue-layout
Version:
73 lines (72 loc) • 1.87 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 e, createVNode as i } from "vue";
import { focusFirstFocusableChild as p, getDefaultSlots as r, validatePackage as s, guid as d } from "@progress/kendo-vue-common";
import { packageMetadata as n } from "../package-metadata.mjs";
const f = /* @__PURE__ */ e({
name: "KendoAppBar",
props: {
id: String,
themeColor: {
type: String,
default: "light"
},
position: {
type: String,
default: "top",
validator: function(t) {
return ["top", "bottom"].includes(t);
}
},
positionMode: {
type: String,
default: "static",
validator: function(t) {
return ["static", "sticky", "fixed"].includes(t);
}
}
},
created() {
s(n), this.calculatedId = d();
},
computed: {
wrapperClass() {
const {
position: t,
positionMode: o,
themeColor: a
} = this.$props;
return {
"k-appbar": !0,
"k-appbar-top": t === "top",
"k-appbar-bottom": t === "bottom",
"k-appbar-static": o === "static",
"k-appbar-sticky": o === "sticky",
"k-appbar-fixed": o === "fixed",
[`k-appbar-${a}`]: !!a
};
}
},
render() {
const t = r(this), {
id: o
} = this.$props;
return i("div", {
class: this.wrapperClass,
id: o || this.calculatedId
}, [t]);
},
methods: {
focus() {
this.$el && p(this.$el);
}
}
});
export {
f as AppBar
};