UNPKG

@progress/kendo-react-dropdowns

Version:

React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package

80 lines (79 loc) 2.24 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 * as t from "react"; import { ActionSheet as h, ActionSheetFooter as u } from "@progress/kendo-react-layout"; import { xIcon as v } from "@progress/kendo-svg-icons"; import { Button as o } from "@progress/kendo-react-buttons"; import { useAdaptiveModeContext as C } from "@progress/kendo-react-common"; const I = (i) => { const { footer: e, windowWidth: n = 0, mobileFilter: r, children: s, navigatable: c, navigatableElements: m, expand: d, animation: p, title: b, subTitle: f, onClose: l } = i, a = C(), x = { navigatable: c || !1, navigatableElements: m || [], expand: d, animation: p !== !1, actions: /* @__PURE__ */ t.createElement( o, { tabIndex: 0, "aria-label": "Cancel", "aria-disabled": "false", type: "button", fillMode: "flat", icon: "x", svgIcon: v, onClick: l } ), filter: r, onClose: l, animationStyles: a && n <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0, title: b, subTitle: f, className: "k-adaptive-actionsheet", position: a && n <= a.small ? "fullscreen" : void 0 }; return /* @__PURE__ */ t.createElement(h, { ...x }, s, e && /* @__PURE__ */ t.createElement(u, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement( o, { size: "large", tabIndex: 0, "aria-label": e.cancelText, "aria-disabled": "false", type: "button", onClick: e.onCancel }, e.cancelText ), /* @__PURE__ */ t.createElement( o, { tabIndex: 0, themeColor: "primary", size: "large", "aria-label": e.applyText, "aria-disabled": "false", type: "button", onClick: e.onApply }, e.applyText ))); }; export { I as AdaptiveMode };