@megha-ui/react 1.3.97 → 1.3.99

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.
@@ -9,7 +9,7 @@ import Button from "../button";
9
9
  import { HiChevronDown } from "react-icons/hi";
10
10
  import { FaChevronDown, FaChevronUp } from "react-icons/fa";
11
11
  const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select...", isMultiple = false, isSelectAll = false, className, style, labelAlignment = "vertical", labelFontSize, labelFontWeight, labelMarginBottom, labelClass, asteriskColor, label, disabled = false, width, searchEnabled = true, dropdownListWidth, marginBottom, marginTop, marginRight, marginLeft, required, dropdownListBG, searchBorderColor = "#2377ba", maxDropdownHeight, border = "1px solid #dbdfe9", selectedCharLength = 0, menuFrom = "left", Tooltip, DropDownIcon, onMenuClose, onMenuOpen, isClear, ClearIcon, clearId, selectedDisplay, checkboxWrapper, isSort = true, onSelectChange, isLoading = false, onApplyChange, withTooltip = false, isCreatable = false, onCreate = () => { }, autoPosition = true, compactDisplay = false, ultraCompactDisplay = false, isGrouping = false, isIcon = false, withValue = false, closeOnSelect = true, }) => {
12
- var _a, _b;
12
+ var _a, _b, _c;
13
13
  const { density } = useDensity();
14
14
  const [isOpen, setIsOpen] = useState(false);
15
15
  const [searchTerm, setSearchTerm] = useState("");
@@ -399,16 +399,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
399
399
  : density === "compact"
400
400
  ? "2rem"
401
401
  : "2.5rem"})`,
402
- })), { position: "relative" }), style), children: [_jsxs("div", { style: {
403
- border,
404
- borderRadius: 4,
405
- display: "flex",
406
- alignItems: "center",
407
- justifyContent: "space-between",
408
- cursor: "pointer",
409
- width: width ? "100%" : "max-content",
410
- padding: "0.5rem",
411
- }, ref: clearIconRef, onClick: handleClick, children: [_jsx("span", { style: {
402
+ })), { position: "relative" }), style), children: [_jsxs("div", { style: Object.assign(Object.assign({}, ({ border: (_c = style === null || style === void 0 ? void 0 : style.border) !== null && _c !== void 0 ? _c : border })), { borderRadius: 4, display: "flex", alignItems: "center", justifyContent: "space-between", cursor: "pointer", width: width ? "100%" : "max-content", padding: "0.5rem" }), ref: clearIconRef, onClick: handleClick, children: [_jsx("span", { style: {
412
403
  display: isIcon
413
404
  ? withValue
414
405
  ? "inline-block"
@@ -813,7 +813,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
813
813
  } }), dropdownVisible === column.key &&
814
814
  (column.uniqueDrop ? (_jsx(GridFilterDropdown, { portalTarget: portalTarget, headerDropdownIndex: headerDropdownIndex, position: searchOpsPosition || { top: 0, left: 0 }, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions.filter((item) => item.label === "Group by"
815
815
  ? !column.isArrayString
816
- : true), onClose: () => setDropdownVisible(null), column: column }), searchOps: search && columnSearchOutside ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
816
+ : true), onClose: () => setDropdownVisible(null), column: column }), searchOps: search ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
817
817
  marginTop: "0.5rem",
818
818
  pointerEvents: search && column.search
819
819
  ? "auto"
@@ -901,7 +901,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
901
901
  }, noLabel: true, wrapperClass: checkboxWrapper }), _jsx("span", { style: {
902
902
  marginLeft: "0.5rem",
903
903
  }, children: formatValue(item, (_b = column === null || column === void 0 ? void 0 : column.dataType) !== null && _b !== void 0 ? _b : "", locale, formatOptions) })] }, item));
904
- })] }))] })) : null, columnIndex: colIndex })) : (_jsx(TextFilterDropdown, { columnIndex: colIndex, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions, onClose: () => setDropdownVisible(null), column: column }), searchOps: search && columnSearchOutside ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
904
+ })] }))] })) : null, columnIndex: colIndex })) : (_jsx(TextFilterDropdown, { columnIndex: colIndex, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions, onClose: () => setDropdownVisible(null), column: column }), searchOps: search ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
905
905
  marginTop: "0.5rem",
906
906
  pointerEvents: search && column.search
907
907
  ? "auto"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.97",
3
+ "version": "1.3.99",
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",