@megha-ui/react 1.3.91 → 1.3.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,24 @@
1
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ReactDOM from "react-dom";
3
3
  const GridFilterDropdown = ({ headerDropdownIndex, position, sortingOps, searchOps, columnIndex, portalTarget, }) => {
4
- const dropdownContent = (_jsxs("div", { style: Object.assign(Object.assign({ position: position ? "absolute" : "absolute" }, (position
4
+ const dropdownContent = (_jsx("div", { style: Object.assign(Object.assign({ position: position ? "absolute" : "absolute" }, (position
5
5
  ? {
6
6
  top: position.top,
7
7
  left: position.left,
8
8
  }
9
- : Object.assign({ top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })))), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "var(--background)", color: "var(--foreground)", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.35rem 0", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), onClick: (e) => e.stopPropagation(), children: [sortingOps, searchOps] }));
9
+ : Object.assign({ top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })))), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "var(--card-bg, var(--background))", color: "var(--foreground)", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", border: "1px solid var(--divider, #eceff4)", listStyleType: "none", padding: "0.35rem 0.35rem", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), onClick: (e) => e.stopPropagation(), children: _jsxs("div", { style: {
10
+ display: "flex",
11
+ flexDirection: "column",
12
+ gap: "0.25rem",
13
+ minWidth: "12rem",
14
+ }, children: [sortingOps && (_jsx("div", { style: {
15
+ padding: "0.35rem 0.5rem 0.25rem",
16
+ borderBottom: searchOps
17
+ ? "1px solid var(--divider, #eceff4)"
18
+ : "none",
19
+ }, children: sortingOps })), searchOps && (_jsx("div", { style: {
20
+ padding: "0.25rem 0.5rem 0.35rem",
21
+ }, children: searchOps }))] }) }));
10
22
  // Render in a portal so the dropdown is not occluded
11
23
  // by sticky header cells or other stacking contexts.
12
24
  return ReactDOM.createPortal(dropdownContent, portalTarget || document.body);
@@ -1,5 +1,16 @@
1
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  const TextFilterDropdown = ({ headerDropdownIndex, sortingOps, searchOps, columnIndex, }) => {
3
- return (_jsxs("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "var(--background)", color: "var(--foreground)", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.25rem 0", width: 230, borderRadius: "0.5rem", margin: 0 }), id: "grid-dropdown", onClick: (e) => e.stopPropagation(), children: [sortingOps && sortingOps, searchOps && searchOps] }));
3
+ return (_jsx("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "var(--card-bg, var(--background))", color: "var(--foreground)", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", border: "1px solid var(--divider, #eceff4)", listStyleType: "none", padding: "0.25rem 0.35rem", width: 230, borderRadius: "0.5rem", margin: 0 }), id: "grid-dropdown", onClick: (e) => e.stopPropagation(), children: _jsxs("div", { style: {
4
+ display: "flex",
5
+ flexDirection: "column",
6
+ gap: "0.25rem",
7
+ }, children: [sortingOps && (_jsx("div", { style: {
8
+ padding: "0.35rem 0.5rem 0.25rem",
9
+ borderBottom: searchOps
10
+ ? "1px solid var(--divider, #eceff4)"
11
+ : "none",
12
+ }, children: sortingOps })), searchOps && (_jsx("div", { style: {
13
+ padding: "0.25rem 0.5rem 0.35rem",
14
+ }, children: searchOps }))] }) }));
4
15
  };
5
16
  export default TextFilterDropdown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.91",
3
+ "version": "1.3.92",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",