UNPKG

@progress/kendo-vue-buttons

Version:
77 lines (76 loc) 2.35 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 b } from "../../Button.mjs"; import { moreHorizontalIcon as d } 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"], inject: { kendoLocalizationService: { default: null } }, methods: { handleClick() { this.$emit("toggleoverflow", !this.$props.opened); } }, render() { const { visibleTools: e, overFlowTools: s, allTools: t } = this.$props, { toolbarRef: a, toolbarWidth: l, fillMode: n, 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(b, { ref: "buttonRef", class: "k-toolbar-overflow-button", fillMode: "flat", svgIcon: d, title: h(this).toLanguageString(i, u[i]), onClick: this.handleClick }, null), o(f, { anchor: a, 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-${n}` }, [e && [...t].splice(e.length, t.length)])] })])]); } }); export { C as ToolbarOverflowSection };