@megha-ui/react 1.2.332 → 1.2.334

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,23 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- const CalculateDropdown = ({ options, onClose, columnKey, }) => {
3
- return (_jsx("ul", { style: {
4
- position: "absolute",
5
- zIndex: 10,
2
+ const CalculateDropdown = ({ rowIndex, options, onClose, columnKey, }) => {
3
+ return (_jsx("ul", { style: Object.assign(Object.assign({ position: "absolute", zIndex: 10 }, (rowIndex > 1 ? {
6
4
  bottom: "2.5rem",
7
- left: 0,
8
- backgroundColor: "var(--background)",
9
- color: "var(--foreground)",
10
- boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)",
11
- listStyleType: "none",
12
- padding: "0.25rem 0",
13
- width: "max-content",
14
- borderRadius: "0.5rem",
15
- fontSize: "inherit",
16
- minWidth: "14.25rem",
17
- transform: "translateY(10px)",
18
- maxHeight: "20rem",
19
- overflow: "auto",
20
- }, onClick: (e) => e.stopPropagation(), children: options.map((option, index) => (_jsx("li", { style: { padding: "0.25rem 0.75rem", cursor: "pointer" }, onClick: () => {
5
+ } : {
6
+ top: "1.5rem"
7
+ })), { left: 0, 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: "max-content", borderRadius: "0.5rem", fontSize: "inherit", minWidth: "14.25rem", transform: "translateY(10px)", maxHeight: "20rem", overflow: "auto" }), onClick: (e) => e.stopPropagation(), children: options.map((option, index) => (_jsx("li", { style: { padding: "0.25rem 0.75rem", cursor: "pointer" }, onClick: () => {
21
8
  columnKey &&
22
9
  option.action &&
23
10
  option.action(columnKey, option.value);
@@ -68,6 +68,8 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
68
68
  flex: widthMode === "auto" ? 1 : undefined,
69
69
  flexGrow: widthMode === "auto" ? 1 : 0,
70
70
  flexShrink: widthMode === "auto" ? 1 : 0,
71
+ display: "flex",
72
+ alignItems: "center",
71
73
  padding: "0.5rem",
72
74
  }, className: `column index-${columnKey}`, children: [index === 0 && (_jsx("span", { style: {
73
75
  fontSize: "inherit",
@@ -110,7 +112,8 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
110
112
  else if (display &&
111
113
  compositeIndex === compositeKeys.length - 1 &&
112
114
  index ===
113
- ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").flatMap((item) => item.split("+")).length) - 1) {
115
+ ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").flatMap((item) => item.split("+")).length) -
116
+ 1) {
114
117
  return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
115
118
  }
116
119
  if (compositeKeys.includes(item.key) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.332",
3
+ "version": "1.2.334",
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",