UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

60 lines (59 loc) 3.07 kB
/** * @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 { checkIcon as r, xIcon as p } from "@progress/kendo-svg-icons"; import { adaptiveToolbarGroupTitle as c, messages as a, groupClearButton as m, groupApplyButton as s } from "../../messages/index.mjs"; import { Button as i } from "@progress/kendo-react-buttons"; import { useLocalization as v } from "@progress/kendo-react-intl"; import { ActionSheet as C, ActionSheetView as h, ActionSheetHeader as f, ActionSheetContent as E, ActionSheetFooter as k } from "@progress/kendo-react-layout"; import { GridContext as S } from "../../utils/GridContext.mjs"; import { GridToolbarAdaptiveContext as x } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs"; import { useAdaptiveModeContext as b } from "@progress/kendo-react-common"; const M = (t) => { const l = e.useContext(S), { actionSheetRef: u } = e.useContext(x), o = b(), n = v(), d = { animation: !0, navigatable: !1, navigatableElements: [], expand: t.computedShow, animationStyles: o && l.adaptiveColumnMenuRef <= o.small ? { top: 0, width: "100%", height: "100%" } : void 0, className: "k-adaptive-actionsheet", position: o && l.adaptiveColumnMenuRef <= o.small ? "fullscreen" : void 0 }, g = n.toLanguageString(c, a[c]); return /* @__PURE__ */ e.createElement( C, { ...d, ref: u, style: { "--kendo-actionsheet-view-current": 1 }, onClose: t.onClose }, /* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(f, 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" }, g)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement( i, { type: "button", svgIcon: r, themeColor: "primary", onClick: t.onClose, fillMode: "flat" } )))), /* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement("div", { className: "k-group-menu k-group-menu-lg" }, t.toolContent)), /* @__PURE__ */ e.createElement(k, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ e.createElement( i, { svgIcon: p, onClick: t.onClear, size: "large", disabled: t.isDisabledButton }, n.toLanguageString(m, a[m]) ), /* @__PURE__ */ e.createElement(i, { svgIcon: r, themeColor: "primary", size: "large", onClick: t.onClose }, n.toLanguageString(s, a[s]))))) ); }; export { M as GridAdaptiveToolbarGroup };