@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
67 lines (66 loc) • 2.92 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
*-------------------------------------------------------------------------------------------
*/
"use client";
import e from "react";
import { ActionSheet as u, ActionSheetView as a, ActionSheetHeader as d, ActionSheetContent as f } from "@progress/kendo-react-layout";
import { useAdaptiveModeContext as v } from "@progress/kendo-react-common";
import { GridContext as p } from "../../utils/GridContext.mjs";
import { Button as h } from "@progress/kendo-react-buttons";
import { xIcon as C } from "@progress/kendo-svg-icons";
import { GridColumnMenuAdaptiveContext as E } from "../adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
import { useLocalization as g } from "@progress/kendo-react-intl";
import { columnMenu as i, messages as k } from "../../messages/index.mjs";
const G = (t) => {
const o = e.useContext(p), { actionSheetRef: r, firstViewRef: l, secondViewRef: m } = e.useContext(E), n = v(), s = g(), c = {
animation: !0,
navigatable: !1,
navigatableElements: [],
expand: t.computedShow,
animationStyles: n && o.adaptiveColumnMenuRef <= n.small ? { top: 0, width: "100%", height: "100%" } : void 0,
className: "k-adaptive-actionsheet",
position: n && o.adaptiveColumnMenuRef <= n.small ? "fullscreen" : void 0
};
return /* @__PURE__ */ e.createElement(
u,
{
...c,
ref: r,
style: { "--kendo-actionsheet-view-current": 1 },
onClose: () => {
t.closeMenu();
}
},
/* @__PURE__ */ e.createElement(
a,
{
className: "k-actionsheet-view-animated",
ref: l,
style: {
transitionDuration: "500ms",
transitionProperty: "transform"
}
},
/* @__PURE__ */ e.createElement(d, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, o.adaptiveTitle || s.toLanguageString(i, k[i]))), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(h, { svgIcon: C, onClick: t.closeMenu, fillMode: "flat" })))),
/* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, t.children))
),
/* @__PURE__ */ e.createElement(
a,
{
className: "k-actionsheet-view-animated",
ref: m,
style: {
transitionDuration: "500ms",
transitionProperty: "transform"
}
}
)
);
};
export {
G as GridAdaptiveColumnMenu
};