UNPKG

@progress/kendo-vue-buttons

Version:
79 lines (78 loc) 2.37 kB
/** * @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 m, createVNode as o, Fragment as r } from "vue"; import { Popup as f } from "@progress/kendo-vue-popup"; import { ToolbarSeparator as c } from "./ToolbarSeparator.mjs"; import { Button as d } from "../../Button.mjs"; import { moreHorizontalIcon as b } from "@progress/kendo-svg-icons"; import { provideLocalizationService as h } from "@progress/kendo-vue-intl"; import { moreButtonTitle as i, messages as u } from "../messages/index.mjs"; import { kendoThemeMaps as g } from "@progress/kendo-vue-common"; const C = /* @__PURE__ */ m({ name: "ToolbarOverflowSection", props: { toolbarRef: Object, toolbarWidth: Number, fillMode: String, size: String, visibleTools: Array, overFlowTools: Array, opened: Boolean, allTools: Array }, emits: { toggleoverflow: (e) => !0 }, inject: { kendoLocalizationService: { default: null } }, methods: { handleClick() { this.$emit("toggleoverflow", !this.$props.opened); } }, render() { const { visibleTools: e, overFlowTools: s, allTools: t } = this.$props, { toolbarRef: n, toolbarWidth: l, fillMode: a, size: p } = this.$props; return o(r, null, [e && [...t].splice(0, e.length), s.length > 0 && o(r, null, [o(c, { class: "k-toolbar-button-separator" }, null), o(d, { ref: "buttonRef", class: "k-toolbar-overflow-button", fillMode: "flat", svgIcon: b, title: h(this).toLanguageString(i, u[i]), onClick: this.handleClick }, null), o(f, { anchor: n, show: this.$props.opened, popupClass: "k-toolbar-popup", key: l, style: { width: l + "px" } }, { default: () => [o("span", { class: `k-toolbar-items-list k-toolbar-items-list-${g.sizeMap[p]} k-toolbar-items-list-${a}` }, [e && [...t].splice(e.length, t.length)])] })])]); } }); export { C as ToolbarOverflowSection };